0

I'm using the plotly library to perform data analysis. However, I encounter a problem when trying to update the data as per the official documentation. The following error message appears,

enter image description here

Given below is my code.

import plotly.plotly as py
import plotly.graph_objs as go
trace0 = go.Scatter(
    x=[3, 4],
    y=[2, 1]
)
trace1 = go.Scatter(
    x=[3, 4],
    y=[3, 2]
)
trace2 = go.Scatter(
    x=[3, 4],
    y=[4, 3]
)
data = [trace0, trace1, trace2]

plot_url = py.offline.plot(data, filename='extend plot', fileopt='extend')

Any help is appreciated. Thanks.

3 Answers 3

1

That's not possible. The offline plot function has no "fileopt" parameter and cannot be extended. Use the online version if you really need to.

Sign up to request clarification or add additional context in comments.

Comments

0

You should use plotly.offline if you want to generate a HTML file.

import plotly.offline as py
# ...
py.plot(data, filename='extend plot', auto_open=False)

Comments

0

First try to do import plotly as py then py.offline.plot. Might work.

Also you need to set up you credentials for offline processing first. import plotly plotly.tools.set_credentials_file(username='DemoAccount', api_key='lr1c37zw81')

something like this. Please check out the link here link here also this one

I think that will solve your problem.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.