简体   繁体   English

从Jupyter Notebook下载图

[英]Download Figure from Jupyter Notebook

I used graphviz to visualize my decision tree in Jupyter Notebook. 我使用graphviz在Jupyter Notebook中可视化我的决策树。 Now my question is how to show full decision tree figure in Jupyter Notebook? 现在我的问题是如何在Jupyter Notebook中显示完整的决策树形象? Or how to save the picture of the decision tree from Jupyter Notebook? 或者如何从Jupyter Notebook中保存决策树的图片?

Now I'm only able to view the entire tree by scroll down. 现在我只能通过向下滚动查看整个树。 I want to see the entire tree in one window. 我想在一个窗口中看到整个树。

Thank you! 谢谢!

在此输入图像描述

This gives a PDF: 这给出了PDF:

from graphviz import Digraph

g = Digraph('G', filename='hello.gv')
g.edge('Hello', 'World')
g.view()

When using Jupyter you can do: --> file --> export notebook as --> export notebook to markdown . 使用Jupyter时你可以这样做: --> file --> export notebook as --> export notebook to markdown You'll get a zip file where a png is included. 你会得到一个包含png的zip文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM