我的法典是,当我把他们 h在地盘点时,就留下错误。 我甚至利用了小供应商的基本例子:webpage,同样的行为也很明显。 如果你再看看一下该守则,你可能不得不点击一线,然后点击vas的空白部分。
import matplotlib.pyplot as plt
import numpy as np
import mplcursors
data = np.outer(range(10), range(1, 5))
fig, ax = plt.subplots()
lines = ax.plot(data)
ax.set_title("Click somewhere on a line.
Right-click to deselect.
"
"Annotations can be dragged.")
mplcursors.cursor(lines) # or just mplcursors.cursor()
plt.show()
Here is the error I get:
H:>python C:Usersm312945DesktopPaulScriptsCluster est_animation_test_mp.py
Traceback (most recent call last):
File "C:Python39libsite-packagesmatplotlibcbook\__init__.py", line 304, in process
func(*args, **kwargs)
File "C:Python39libsite-packagesmatplotliboffsetbox.py", line 1550, in on_release
if self._check_still_parented() and self.got_artist:
File "C:Python39libsite-packagesmatplotliboffsetbox.py", line 1560, in _check_still_parented
self.disconnect()
File "C:Python39libsite-packagesmatplotliboffsetbox.py", line 1568, in disconnect
self.canvas.mpl_disconnect(cid)
File "C:Python39libsite-packagesmatplotliboffsetbox.py", line 1517, in <lambda>
canvas = property(lambda self: self.ref_artist.figure.canvas)
AttributeError: NoneType object has no attribute canvas