There are many limitations in mpl_to_plotly
and we haven’t updated this code in years. The code is pretty gnarly and we decided to double down on the native plotly syntax instead of continuing to work on these converters.
So, if it works for you then that’s great! But if it doesn’t, I recommend:
- Modifying the returned
fig
yourself after converting - Or, recreating the figure with the plotly syntax
- Or, embedding the matplotlib figure as a static image in your app with
html.Img(src='...')
where source is the base64 encoded version of the image (https://stackoverflow.com/questions/38061267/matplotlib-graphic-image-to-base64)