dash的一个组件库,旨在促进python中的网络可视化,包装在cytoscape.js中
dash-cytoscape的Python项目详细描述
破折号细胞景观![GitHub license](https://warehouse-camo.cmh1.psfhosted.org/c88fab50b4a1dc0cd91faeb7ba5654d56e380260/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)
![PyPi Version](https://warehouse-camo.cmh1.psfhosted.org/f634c9133467b6d6b9b750c6d30132c97ae40fd8/68747470733a2f2f696d672e736869656c64732e696f2f707970692f762f646173682d6379746f73636170652e737667)
一个破折号组件库,用于在python中创建交互式和可定制的网络,包装在Cytoscape.js周围。
- Medium Article
- ?Community Announcement
- ?Github Repository
- ?User Guide
- Component Reference
- Webinar Recording
开始
先决条件
确保正确安装了Dash及其相关库:
pip install dash dash-html-components
如果要安装最新版本,请查看Dash docs on installation。
使用量
使用pip安装库:
pip install dash-cytoscape
在app.py
文件中创建以下示例:
importdashimportdash_cytoscapeascytoimportdash_html_componentsashtmlapp=dash.Dash(__name__)app.layout=html.Div([cyto.Cytoscape(id='cytoscape',elements=[{'data':{'id':'one','label':'Node 1'},'position':{'x':50,'y':50}},{'data':{'id':'two','label':'Node 2'},'position':{'x':200,'y':200}},{'data':{'source':'one','target':'two','label':'Node 1 to 2'}}],layout={'name':'preset'})])if__name__=='__main__':app.run_server(debug=True)
外部布局
也可以添加外部布局。使用cyto.load_extra_layouts()
函数开始:
importdashimportdash_cytoscapeascytoimportdash_html_componentsashtmlcyto.load_extra_layouts()app=dash.Dash(__name__)app.layout=html.Div([cyto.Cytoscape(...)])
文件
Dash Cytoscape User Guide包含有关库的所有信息它包含有用的示例、功能代码,并且是完全交互的您还可以使用component reference来获得完整而简洁的api规范。
要了解有关核心短划线组件和如何使用回调的更多信息,请查看Dash documentation。
有关底层javascript api的补充信息,请查看Cytoscape.js documentation。
贡献
确保您已经阅读并理解了我们的code of conduct,然后转到CONTRIBUTING开始。
许可证
Dash,Cytoscape.js和Dash Cytoscape是麻省理工学院授权的有关详细信息,请查看LICENSE。
联系和支持
联系方式见https://plot.ly/dash/support
致谢
非常感谢cytoscape联盟和cytoscape.js团队为创建交互式网络提供了如此完整的api。如果没有他们的大量工作,这个图书馆是不可能的
Pull请求和问题模板的灵感来自 scikit-learn project。
图库
与elements交互: