简体   繁体   中英

mpld3.fig_to_html throws AttributeError: module 'matplotlib.dates' has no attribute '_SwitchableDateConverter'

I am using mpld3.fig_to_html form the last three months its working fine but from the last two days, it's showing error. All of my code stop workings. Can anyone suggest to me how to solve this error?

error: AttributeError: module 'matplotlib.dates' has no attribute '_SwitchableDateConverter'

also, this simple code throws the same error.

fig = plt.figure()
plt.scatter([1, 10], [5, 9])
html_graph = mpld3.fig_to_html(fig)

collab file: https://colab.research.google.com/drive/17W1_vfOZTYmhodzziNEC7wPiuZuF9Cc1?usp=sharing .

If you're using colab, restart your runtime then reinstall older mpld3 version with .pip install matplotlib==3.2.1 mpld3==0.5.5

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM