如何解决阴谋的离线错误?

时间:2018-08-01 14:24:46

标签: plotly

我遵循了Using plotly without online plotly account,并在笔记本的开头做了以下代码:

from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
init_notebook_mode(connected=True)

import plotly.plotly as py
import plotly.graph_objs as go
from plotly.graph_objs import *
import cufflinks as cf

但是我仍然有错误:

PlotlyRequestError: Account limit reached: Your account is limited to creating 25 charts. To continue, you can override or delete existing charts or you can upgrade your account at: https://plot.ly/products/cloud

如何正确执行离线剧情散布?

谢谢

3 个答案:

答案 0 :(得分:0)

尝试:

import plotly.offline as pyo

代替

import plotly.plotly as py

答案 1 :(得分:0)

由于没有完整的工作代码可调试,请参考以下示例代码,您必须错误地调用iplot

from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
init_notebook_mode(connected=True)

import plotly.plotly as py
import plotly.graph_objs as go
from plotly.graph_objs import *
import cufflinks as cf

data = [go.Bar(
            x=['giraffes', 'orangutans', 'monkeys'],
            y=[20, 14, 23]
    )]

iplot(data, filename='basic-bar')

答案 2 :(得分:0)

我不知道您是否已经找到解决方案,但是以这种方式进行图导入:

import plotly.plotly as py
import plotly.graph_objs as go
# these two lines allow your code to show up in a notebook
from plotly.offline import init_notebook_mode, iplot
init_notebook_mode()

然后像这样调用iplot:

plotly.offline.iplot(...)

绘制工作图可能是这样做的方法!希望对您有所帮助:)