No interactivity in plotly plots in Spyder 4

Viewed 158

I have recently upgraded to Spyder 4.1.3 (up from Spyder 3.x) and have also consequently upgraded many packages along the way. Plots now show up in the dedicated plots pane (which is a nice addition to Spyder in general). However, now when I generate plots using plotly, there is no interactivity with the resultant plots whether inline or in the plots pane. This used to be there in Spyder 3.x. For example, running the sample code from plotly:

import plotly.express as px
df = px.data.gapminder().query("year == 2007")
fig = px.scatter_geo(df, locations="iso_alpha",
                     color="continent", # which column to use to set the color of markers
                     hover_name="country", # column added to hover information
                     size="pop", # size of markers
                     projection="natural earth")
fig.show()

The plot shows up in the plot pane but when I hover over it with the mouse nothing pops up. When I run the same code in Jupyter I do get the interactivity. Any ideas about how to get this functionality going in Spyder 4?

0 Answers
Related