I get an 'PlotlyRequestError: No message' when I execute the code.
import plotly
import plotly.plotly as py
import plotly.graph_objs as go
Filedata = pd.read_csv('C:\\Documents\\Book4.csv')
data = [go.Scatter(x=Filedata.ix[:,0],y=Filedata.ix[:,1])]
layout = go.Layout(
title='Analysis 2016',
xaxis=dict(title='Startdate'),
yaxis=dict(title='Conductivity'))
fig = go.Figure(data=data, layout=layout)
py.iplot(fig)
I had the same issue and I solved the problem by importing plotly like this:
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()
And then calling iplot like this:
plotly.offline.iplot(...)
This is because you are trying to plot online which requires credentials based authentication. To plot offline, use plotly.offline's plot class to accomplish this without authentication.
from plotly.offline import plot
and then use this plot to plot your figure.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With