简体   繁体   English

如何与情节图表分享jupyter笔记本?

[英]How to share a jupyter notebook with plotly charts?

Does anyone knows how should I share a jupyter notebook (with python3 ) that contains plotly made charts ? 有谁知道我应该如何分享一个包含plotly图表的jupyter notebook (使用python3 )? So far I use github to share notebooks, but the plotly charts just won't show up on it. 到目前为止,我使用github来共享笔记本,但plotly图表不会出现在它上面。

You need to use Plotly Offline for iPython Notebooks . 您需要使用Plotly Offline for iPython Notebooks The link shows the syntax for creating charts. 该链接显示了创建图表的语法。 If you create the charts in offline mode, you can covert the notebook to html and share it with anyone. 如果您在离线模式下创建图表,则可以将笔记本转换为html并与任何人共享。 You would do this by: 你会这样做:

  1. Creating the charts with Plotly Offline 使用Plotly Offline创建图表
  2. cd into your directory where the notebook is held cd进入笔记本所在的目录
  3. convert the notebook to a static html file by typing ipython nbconvert [YOUR NOTEBOOK NAME].ipynb 通过键入ipython nbconvert [YOUR NOTEBOOK NAME].ipynb将笔记本转换为静态html文件ipython nbconvert [YOUR NOTEBOOK NAME].ipynb

If you use kyso.io (disclaimer: I founded kyso) you can share notebooks online easily and it supports plotly. 如果您使用kyso.io(免责声明:我创建了kyso),您可以轻松地在线共享笔记本,并且它支持plotly。

you can share a notebook using these commands 您可以使用这些命令共享笔记本

kyso create "some study title"
kyso push "a version message"

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

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