python - 如何在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)
解决方案
推荐阅读
- excel - 为什么点击事件会出现不匹配错误?
- javascript - 我想在每个 'domino' 元素中添加这个 'DotsDiv' 元素
- tensorflow - Model.fit() 是否将整个训练数据集上传到 GPU?
- python - 如何使用与 mypy 泛型兼容的值参数进行子类化?
- ethereum - 将智能合约部署到以太扫描网络
- javascript - 从 XML/HTML 获取实际的人类可读文本?
- python - 有没有办法将函数/语句指向自身?
- python - RFECV 与 GridSearchCV 的评分有什么区别?
- spring - 如何将所有请求的 HTML 响应更改为 JSON
- jquery - 当我试图停留在页面底部时,页面一直向上滚动几英寸