I am using offline plotly inside jupyter notebook. I was getting the plots but suddenly I ran my code today and see blank output for similar codes as :
import plotly.offline as pltly
import plotly.graph_objs as go
import numpy as np
N = 500
random_x = np.linspace(0, 1, N)
random_y = np.random.randn(N)
Create a trace
trace = go.Scatter(
x = random_x,
y = random_y
)
data = [trace]
pltly.iplot(data, filename=ābasic-lineā)
and Error : " Aw, snap! We didnāt get a username with your request.
Donāt have an account? https://plot.ly/api_signup
Questions? accounts@plot.l" for codes like:
import cufflinks as cf
#Linechart
cf.datagen.lines().iplot(kind=āscatterā,xTitle=āDatesā,yTitle=āReturnsā,title=āCufflinks - Line Chartā)
or codes like:
import plotly.offline as pltly
import cufflinks as cf
import pandas as pd
import numpy as np
df = pd.DataFrame(np.random.rand(10, 4), columns=[āaā, ābā, ācā, ādā])
df.iplot(kind=āareaā, fill=True, filename=ācufflinks/stacked-areaā)
Hi @priyankalaha,
It looks like your Chart Studio account info isnāt being found properly. Perhaps try going trough the āInitialization for Online Plottingā instructions again. Or, for plotting inline in the notebook you could switch to āofflineā mode (See https://plot.ly/python/getting-started/#initialization-for-offline-plotting) which doesnāt require an account at all.
Hope that helps,
-Jon
Hi @jmmease,
I tried creating the plots as given in the link, I am getting the plots. But if I am working with panda dataframes or cufflinks, I get the Error:
Aw, snap! We didnāt get a username with your request.
Donāt have an account? https://plot.ly/api_signup
Questions? accounts@plot.ly
I have used the following code to test given in https://plot.ly/ipython-notebooks/cufflinks/
import plotly
import plotly.graph_objs as go
import cufflinks as cf
import pandas as pd
import numpy as np
df = cf.datagen.lines()
df.iplot(kind=āscatterā, filename=ācufflinks/cf-simple-lineā)
Plotly version=3.7.0
Jupyter notebook=5.7.6
I typed the code wrong while replying
import plotly
plotly.offline.init_notebook_mode(connected=True)
import cufflinks as cf
import pandas as pd
import numpy as np
df = cf.datagen.lines()
df.iplot(kind=āscatterā, filename=ācufflinks/cf-simple-lineā)
I continue to get the same error
Hi @priyankalaha,
If the plots are working with plotly.py directly and not with cufflinks then you could try opening an issue with the cufflinks project and see if anyone over there has any ideas.
-Jon
Hi @jmmease,
Okay, I will do that.
-Priyanka