Learn how to use Dash Bio for next-gen sequencing & quality control. 🧬Register for the Oct 27 webinar.

Plotly for Spyder

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.

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]}])


1 Like

You can also change default renderer.

import plotly.io as pio
pio.renderers.default = "browser"