从两个树状图绘制简单的缠结图
tanglegram的Python项目详细描述
tanglegram使用scipy和matplotlib绘制简单的tanglegram。灵感来源于Tal Galili的惊人的[dendextend](https://github.com/tal galili/dendextend)。
获取[pip](https://pip.pypa.io/en/stable/installing/)并在终端中运行:
`pip install git+git://github.com/schlegelp/tanglegram@master`
此命令也应用于更新包。
**注意**:在Windows上,依赖项(即numpy、pandas和scipy)可能无法自动安装。最好的办法是获得一个已经包含它们的python发行版(例如,[anaconda](https://www.continum.io/downloads))。
如果默认发行版是python 2,你必须明确告诉[pip](https://pip.pypa.io/en/stable/installing/)为python 3安装:
`pip3 install git+git://github.com/schlegelp/tanglegram@master`
\git://github.com/schlegelp/tanglegram@master`
不过,你可能会在windows上遇到问题。在这种情况下,您需要手动安装依赖项,以下是依赖项的列表(请在[setup.py](https://raw.githubusercontent.com/schlegelp/pymaid/master/setup.py)中查看“install-requires”以获取版本信息):
-[熊猫](http://pandas.pydata.org/)
-[科学复制](http://www.scipy.org)
-[科学复制](http://www.matplotlib.org)
-[科学复制](http://www.matplotlib.org)
-【TQM】(https://pypi.pypython.org/pypi/TQM/TQM)
“,”d“]
数据=[[0,.1,.4,.3],
[.1,0,.5,.6],
[.4,.5,0,.2],
[.3,.6,.2,0]]
mat1=pd.dataframe(data,
columns=labelsa,
index=labelsa)
mat2=pd.dataframe(data,
columns=labelsb,
index=labelsb)
img src=“https://user-images.githubusercontent.com/7161148/42809649-fde86b00-89ad-11e8-9ecd-051f40731bc1.png”width=“650”>;
已知问题:
*布局缩放不好,即小树状图看起来很奇怪
许可证:
此代码在gnu gpl v3下
获取[pip](https://pip.pypa.io/en/stable/installing/)并在终端中运行:
`pip install git+git://github.com/schlegelp/tanglegram@master`
此命令也应用于更新包。
**注意**:在Windows上,依赖项(即numpy、pandas和scipy)可能无法自动安装。最好的办法是获得一个已经包含它们的python发行版(例如,[anaconda](https://www.continum.io/downloads))。
如果默认发行版是python 2,你必须明确告诉[pip](https://pip.pypa.io/en/stable/installing/)为python 3安装:
`pip3 install git+git://github.com/schlegelp/tanglegram@master`
\git://github.com/schlegelp/tanglegram@master`
不过,你可能会在windows上遇到问题。在这种情况下,您需要手动安装依赖项,以下是依赖项的列表(请在[setup.py](https://raw.githubusercontent.com/schlegelp/pymaid/master/setup.py)中查看“install-requires”以获取版本信息):
-[熊猫](http://pandas.pydata.org/)
-[科学复制](http://www.scipy.org)
-[科学复制](http://www.matplotlib.org)
-[科学复制](http://www.matplotlib.org)
-【TQM】(https://pypi.pypython.org/pypi/TQM/TQM)
“,”d“]
数据=[[0,.1,.4,.3],
[.1,0,.5,.6],
[.4,.5,0,.2],
[.3,.6,.2,0]]
mat1=pd.dataframe(data,
columns=labelsa,
index=labelsa)
mat2=pd.dataframe(data,
columns=labelsb,
index=labelsb)
img src=“https://user-images.githubusercontent.com/7161148/42809649-fde86b00-89ad-11e8-9ecd-051f40731bc1.png”width=“650”>;
已知问题:
*布局缩放不好,即小树状图看起来很奇怪
许可证:
此代码在gnu gpl v3下