I am unable to view interactive plots in Ipython console using spyder IDE. Whenever I am using iplot function, it gives me an output β<plotly.tools.PlotlyDisplay object>β. Please help me resolve this issue.
1 Like
@nitish_a iplot generates a plot only in an Jupyter Notebook.
1 Like
Hi @nitish_a,
As @empet explained, iplot
doesnβt work in Spyder. Youβre best bet is to use plotly.plotly.plot
(online) or plotly.offline.plot
(offline), which will display the plot in your default web browser. For example
from plotly.offline import plot
import plotly.graph_objs as go
fig = go.Figure(data=[{'type': 'scatter', 'y': [2, 1, 4]}])
plot(fig)
1 Like
You can also change default renderer.
import plotly.io as pio
pio.renderers.default = "browser"
1 Like