方法一:

参考:https://qa.1r1g.com/sf/ask/3784497181/
添加代码:

import plotly.io as pio
pio.renderers.default = 'iframe' # or 'notebook' or 'colab' or 'jupyterlab'
方法二:

参考:https://zhuanlan.zhihu.com/p/66357760
生成为本地的html文件

import plotly.offline as py
py.plot(fig, filename='filename.html')
方法三:

参考:https://www.zhihu.com/question/401233169

在这里插入图片描述

Logo

鸿蒙生态一站式服务平台。

更多推荐