I know there is a similar thread over here, but I have not managed to find any solutions within.
When I try to run some of the example Plotly code, the page never seems to load for me.
For instance, I run the below in VSCode
import plotly.express as px data_canada = px.data.gapminder().query("country == 'Canada'") fig = px.bar(data_canada, x='year', y='pop') fig.show()
Every instance of me running opens the localhost with a different port, and the page never successfully loads.
It’s only when I write to html, with the below code, does it appear as intended.
import plotly.graph_objects as go fig = go.Figure(data=go.Bar(y=[2, 3, 1])) fig.write_html('first_figure.html', auto_open=True)
Is there anyway to use fig.show() as described in the documentation?