-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Description
The issue:
When rendering more than 8 line graphs in vscode notebook editor a very strange thing happens.
As long as the number of graphs remain under 8 they are all displayed properly. As additional graphs are added the first ones loose their content so that only the last 8 are properly displayed. The graphs that loose their content don't just disappear, they still display the background, grid, legend, and even when hovering with the mouse over the empty graph the popup label is displayed properly, only the lines are missing. The attached screenshot shows such a graph that lost its content.
Reproducing:
import plotly.express as px
df = px.data.gapminder()
for i in range(0,10):
fig = px.line(df, x="year", y=["lifeExp", "gdpPercap"], title='Life expectancy in Canada')
fig.show()
Version info:
- vscode: latest (1.61.2)
- python: 3.6.8
- plotly: latest (5.3.1)
Additional info:
- This only happens with "complex" graphs. If you remove one of the fields from the y axis in the above example it won't happen any more.
- It doesn't seem to happen with other types of graphs, at least not with bar charts.
- I didn't test this directly in Jupyter so don't know if the issue happens there as well.
- Explicitly setting
plotly.io.renderers.default = "vscode"
doesn't help
Metadata
Metadata
Assignees
Labels
No labels