Reputation: 7577
How would I convert this code to work 'offline' in the Jupyter notebook?
import plotly.plotly as py
import plotly.graph_objs as go
trace = go.Heatmap(z=[[1, 20, 30],
[20, 1, 60],
[30, 60, 1]])
data=[trace]
py.iplot(data, filename='basic-heatmap')
Upvotes: 0
Views: 1106
Reputation: 31739
Just add
import plotly
plotly.offline.init_notebook_mode()
and plot via
plotly.offline.iplot(data, filename='basic-heatmap')
Upvotes: 1