I am trying to run an example code to visualise a plotly chart, as below:
import plotly.express as px
from plotly.offline import init_notebook_mode, iplot, plot
import plotly.offline as py
py.init_notebook_mode(connected=True)
%matplotlib inline
df = pd.DataFrame([
['Europe', 586098529, 'Total'], ['Asia', 3811953827, 'Total'],
['France', 61083916, 'Europe'], ['Germany', 82400996, 'Europe'], ['Italy', 58147733, 'Europe'],
['Spain', 40448191, 'Europe'], ['United Kingdom', 60776238, 'Europe'], ['Taiwan', 23174294, 'Asia'],
['Japan', 127467972, 'Asia'], ['Korean', 49044790, 'Asia'], ['China', 1318683096, 'Asia']],
columns=['country', 'pop', 'continent'])
fig = px.sunburst(df, names='country', values='pop', parents='continent', title='Population')
plot(fig,show_link = False)
When I run this, a new internet browser opens up to show the chart. Is there a way to show this just in Jupyter itself?