【问题标题】:plotly does not show the plots in google colaboratoryplotly 不显示谷歌合作实验室中的情节
【发布时间】:2021-06-13 23:07:24
【问题描述】:

我有一个名为“Actuals”的数据框,按时间索引。这就是我想要绘制 Load 列的方式。

fig = go.Figure([go.Scatter(x=Actuals.index, y= Actuals['Load (kW)'])])
fig.show()

当我运行这部分时,它执行时不会出现任何错误。但它不显示数字。问题是什么,我该如何解决? 我正在使用 Google 合作实验室

【问题讨论】:

标签: python pandas plot plotly scatter-plot


【解决方案1】:

我应该添加这行代码:

import plotly.io as pio
pio.renderers.default = 'colab'

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-08-02
    • 1970-01-01
    • 2019-04-24
    • 2021-03-14
    • 2019-01-12
    • 1970-01-01
    • 1970-01-01
    • 2018-11-04
    相关资源
    最近更新 更多