Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在 Jupyter 中使用 Graphviz #30

Open
rainyear opened this issue Apr 9, 2016 · 0 comments
Open

在 Jupyter 中使用 Graphviz #30

rainyear opened this issue Apr 9, 2016 · 0 comments
Assignees

Comments

@rainyear
Copy link
Owner

rainyear commented Apr 9, 2016

利用 Graphviz 可以很方便地绘制流程图、数据结构图等,结合 Jupyter 可以更方便地做可视化展示。

1. 安装 graphviz

官方下载页面,Mac 下面直接下载 pkg 安装包,双击即可安装。Ubuntu 需要下载 deb 包,然后通过 dpkg 安装:

sudo dpkg -i graphviz_2.38.0-1~saucy_amd64.deb

有依赖包可能需要下载安装或通过 sudo apt-get -f install 解决。

2. 安装 Python 封装

pip install graphviz

安装好之后可以直接在 Jupyter 中调用,通过文档发现:

Graph and Digraph objects have a _repr_svg_()-method so they can be rendered and displayed directly inside a Jupyter notebook.

也就是说可以直接在 Jupyter 中 Output 出来,实例见lolita::graphviz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant