Yes, Spyder is a great analysis environment! Right now,
plotly_express returns a special
go.Figure subclass that displays itself using
plotly.offline.iplot when it’s asked to render itself in a Jupyter notebook context. If you’d like to display the figure in a browser, you can use
plotly.offline.plot on the figure returned by
plotly_express. Something like
import plotly_express as px
from plotly.offline import plot
fig = px.scatter(...)
I’m also working on a brand new rendering subsystem for plotly.py that will become the default in version 4 that will make working in non-notebook contexts a lot easier. See https://github.com/plotly/plotly.py/pull/1474 for more details if you’re interested. And I’d appreciate help with testing if you’d be willing to give the development build a try.
To install, create a new virtual environment or conda environmnet and then run:
$ pip install https://11196-14579099-gh.circle-artifacts.com/0/dist/plotly-3.7.0%2B44.g2677dafe.tar.gz
Then check out the plotly.io.renderers section of https://github.com/plotly/plotly.py/pull/1474 for info on configuring renderers. For use in spyder, you’ll be most interested in the ‘browser’ renderer for displaying figures in a browser tab, and the ‘png’ renderer for displaying figures as static images inline in the QtConsole.
If you do give it a spin, please post any feeback on how it went as a comment on https://github.com/plotly/plotly.py/pull/1474. Thanks!