Hello everyone !
I am trying to run a code to plot a graph but this error appears.
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
Would you help me ?
Thanks!
Hi @Luiz_Claudio,
Could you please post a small example of the code you’re running? This is done in markdown by surrounding the code like this
```python
import plotly.graph_objs as go
```
Thanks!
Hi @jmmease
I’m using this code to test.
import plotly.plotly as py
import plotly.graph_objs as go
import numpy as np
y0 = np.random.randn(50)-1
y1 = np.random.randn(50)+1
trace0 = go.Box(
y=y0
)
trace1 = go.Box(
y=y1
)
data = [trace0, trace1]
py.iplot(data)
Thanks !
In order to use online plotting, you first need to set up your plotly account and credentials file by following the instructions here: https://plot.ly/python/getting-started/#initialization-for-online-plotting.
Alternatively, you can use offline plotting, in which case you don’t need an account. For example
from plotly.offline import iplot, init_notebook_mode
import plotly.graph_objs as go
init_notebook_mode()
import numpy as np
y0 = np.random.randn(50)-1
y1 = np.random.randn(50)+1
trace0 = go.Box(
y=y0
)
trace1 = go.Box(
y=y1
)
data = [trace0, trace1]
iplot(data)
Hope that helps!