I have a Jupyter notebook (python) where I used plotly express to plot in the notebook for analysis purposes. I want to share this notebook with non-coders, and have the interactive visuals be available still - but it does not seem to work.
I tried following recommendations made here but even after saving widgets state and using nbconvert
, when I open the new HTML file, the visuals are not available.
A sample line of plotting can be seen below:
import plotly_express as px
fig = px.scatter(
df,
x='size',
y='size_y',
color='clients',
hover_data=['id'],
marginal_y="histogram",
marginal_x="histogram"
)
fig.show()
FigureWidget
? If you're not, then justfigure.show()
to display the chart and export to HTML, works without issue for me. – Likefigure.show()
but it gave the same results, of not displaying the figures when exported to html – BetaineC:\ProgramData\Anaconda3\lib\site-packages\nbconvert\filters\datatypefilter.py:41: UserWarning: Your element with mimetype(s) dict_keys(['application/vnd.plotly.v1+json']) is not able to be represented. mimetypes=output.keys())
– Betaine