In [2]:
import plotly

from plotly.graph_objs import Scatter, Layout
plotly.offline.plot({
"data": [
    Scatter(x=[1, 2, 3, 4], y=[4, 1, 3, 7])
],
"layout": Layout(
    title="hello world"
)
})


Out[2]:
'file:///home/jovyan/work/Documents/Dropbox/graphene_biteI/temp-plot.html'

In [1]:
import plotly

plotly.offline.init_notebook_mode() # run at the start of every notebook
plotly.offline.iplot({
"data": [{
    "x": [1, 2, 3],
    "y": [4, 2, 5]
}],
"layout": {
    "title": "hello world"
}
})



In [2]:
%pylab inline


Populating the interactive namespace from numpy and matplotlib

In [36]:
import plotly.graph_objs as go

x,y=meshgrid(linspace(-10,10,25),linspace(-10,10,25))
z_data=exp(-x**2-y**2)

In [46]:
data = [
    go.Surface( z=exp(-((x)**2+(y)**2)/10) )]
layout = go.Layout(   
    width=500,
    height=500,
    colorbar=False
)


---------------------------------------------------------------------------
PlotlyDictKeyError                        Traceback (most recent call last)
<ipython-input-46-ecb1de7a2c42> in <module>()
      4     width=500,
      5     height=500,
----> 6     colorbar=False
      7 )

/opt/conda/lib/python3.5/site-packages/plotly/graph_objs/graph_objs.py in __init__(self, *args, **kwargs)
    373         d = {key: val for key, val in dict(*args, **kwargs).items()}
    374         for key, val in d.items():
--> 375             self.__setitem__(key, val, _raise=_raise)
    376 
    377     def __dir__(self):

/opt/conda/lib/python3.5/site-packages/plotly/graph_objs/graph_objs.py in __setitem__(self, key, value, _raise)
    424                 if _raise:
    425                     path = self._get_path() + (key, )
--> 426                     raise exceptions.PlotlyDictKeyError(self, path)
    427                 return
    428 

PlotlyDictKeyError: 'colorbar' is not allowed in 'layout'

Path To Error: ['colorbar']

Valid attributes for 'layout' at path [] under parents []:

    ['radialaxis', 'boxgroupgap', 'yaxis', 'angularaxis', 'width',
    'hidesources', 'margin', 'geo', 'boxgap', 'bargap', 'legend',
    'hovermode', 'plot_bgcolor', 'xaxis', 'shapes', 'smith', 'annotations',
    'title', 'hiddenlabels', 'scene', 'titlefont', 'boxmode', 'height',
    'paper_bgcolor', 'dragmode', 'barmode', 'orientation', 'bargroupgap',
    'hiddenlabelssrc', 'barnorm', 'showlegend', 'ternary', 'font',
    'direction', 'separators', 'autosize']

Run `<layout-object>.help('attribute')` on any of the above.
'<layout-object>' is the object at []

In [43]:
fig = go.Figure(data=data, layout=layout)

In [44]:
plotly.offline.iplot(fig)



In [ ]: