首页 > 解决方案 > 如何在jupyter笔记本中保存离线图形?

问题描述

我正在使用 plotly 在 jupyter notebook 中绘制图形。重新打开 jupyter notebook 后,所有的数字都没有显示出来。我想知道是否可以在保存后将数字保存在笔记本中,就像使用 matplotlib 或 seaborn 一样。谢谢


import plotly.graph_objects as go
import plotly
from plotly.offline import init_notebook_mode, iplot
from plotly.subplots import make_subplots

#fig=make_subplots(specs=[[{"secondary_y": True}]])
fig=go.Figure()

fig.add_scatter(x=differenced_data.index[-1*n_steps:], y=test.values,name='test data',mode='lines+markers',marker=dict(color='green',size=5)) #mode='markers','lines','lines+markers'

iplot(fig)

标签: pythonplotlyjupyter

解决方案


推荐阅读