绘图友好,jupyter笔记本html导出程序。
plotlyhtmlexporter的Python项目详细描述
Plotly友好的jupyter笔记本html导出程序。
NBConvert是将Jupyter Notebooks转换为其他格式(pdf、html等)的模块。 它提供HTMLExporter,用于将jupyter笔记本转换为html。
PlotlyHTMLExporter是从HTMLExporter派生的自定义导出程序。它清理js/html 存在于输出单元格中,但保持受信任的plotly.js输出的完整性,从而允许plotly 要在生成的HTML中呈现的图表。
安装:
使用pip:
$ pip install plotlyhtmlexporter
来源:
$ git clone https://github.com/plotly/plotlyhtmlexporter $ cd plotlyhtmlexporter $ python setup.py install
用法:
从命令行(使用nbconvert):
$ jupyter nbconvert --to plotlyhtml mynotebook.ipynb
从python解释器:
>>> import nbformat >>> nb = nbformat.read('mynotebook.ipynb', 4) >>> from plotlyhtmlexporter import PlotlyHTMLExporter >>> exp = PlotlyHTMLExporter() >>> body, resources = exp.from_notebook_node(nb)
许可证:麻省理工学院