繁体   English   中英

mpld3.fig_to_html 抛出 AttributeError:模块“matplotlib.dates”没有属性“_SwitchableDateConverter”

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

我在过去三个月使用 mpld3.fig_to_html ,它工作正常,但从最近两天开始,它显示错误。 我所有的代码都停止工作。 谁能建议我如何解决这个错误?

错误:AttributeError:模块“matplotlib.dates”没有属性“_SwitchableDateConverter”

此外,这个简单的代码也会引发同样的错误。

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

协作文件: https://colab.research.google.com/drive/17W1_vfOZTYmhodzziNEC7wPiuZuF9Cc1?usp=sharing

如果您使用的是 colab,请重新启动运行时,然后使用 .pip 重新安装较旧的 mpld3 版本.pip install matplotlib==3.2.1 mpld3==0.5.5

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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