库中缺少“plotting”和Matplotlib“plotting”,需要自己安装吗?

2024-10-02 16:32:07 发布

您现在位置:Python中文网/ 问答频道 /正文

我导入了matplotlib。Python3.X、MacOS、Chrome

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


我得到这个错误。有人知道为什么以及如何修复吗? “绘图”是另一个库的一部分,需要从其他软件包安装吗? 多谢各位

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)

----------


 ##

Tags: fromimportplotmatplotlibaspltplottingpython3