繁体   English   中英

“绘图”和 Matplotlib - 库中是否缺少“绘图”并且需要自己安装?

[英]“plotting” and Matplotlib - Is 'plotting' missing from library and need its own install?

我进口了matplotlib。 Python 3.X,Mac 操作系统,Chrome。

import matplotlib.pyplot as plt
from plotting import plot_diagram, plot_landscapes
from plotting import plot_betti_surfaces, plot_betti_curves


我得到这个错误。 有谁知道为什么以及如何解决? “绘图”是否是不同库的一部分,需要从其他 package 安装? 谢谢你。

ImportError                               Traceback (most recent call last)
<ipython-input-72-8c06bd9c066e> in <module>
     11 import matplotlib.pyplot as plt
     12 from plotting import plot_diagram, plot_landscapes
---> 13 from plotting import plot_betti_surfaces, plot_betti_curves
     14 from plotting import plot_point_cloud
     15 from pandas.plotting import register_matplotlib_converters

ImportError: cannot import name 'plot_betti_surfaces' from 'plotting' (/Users/username/opt/anaconda3/lib/python3.7/site-packages/plotting/__init__.py)

----------


 ##

我认为您错过了安装plotting

pip install plotting

看来plot_betti_surfaces是不同的 package,“giotto-tda”的一部分。

https://docs-tda.giotto.ai/latest/modules/generated/plotting/gtda.plotting.plot_betti_surfaces.html

暂无
暂无

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

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