Python file is as follows:
import matplotlib.pyplot as plt
fig = plt.figure()
plt.show()
after execution, you can run the display window:
but the problem is that once the touch mouse (MagicMouse) scrolls in the Figure window, it will report an error:
Traceback (most recent call last):
File "/Users/***/PycharmProjects/LNN/venv/pltTest.py", line 4, in <module>
plt.show()
File "/Users/***/PycharmProjects/LNN/venv/lib/python3.6/site-packages/matplotlib/pyplot.py", line 253, in show
return _show(*args, **kw)
File "/Users/***/PycharmProjects/LNN/venv/lib/python3.6/site-packages/matplotlib/backend_bases.py", line 208, in show
cls.mainloop()
File "/Users/***/PycharmProjects/LNN/venv/lib/python3.6/site-packages/matplotlib/backends/_backend_tk.py", line 1073, in mainloop
Tk.mainloop()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/tkinter/__init__.py", line 557, in mainloop
_default_root.tk.mainloop(n)
UnicodeDecodeError: "utf-8" codec can"t decode byte 0xff in position 0: invalid start byte
doesn"t pyplot support gestures that touch the mouse? Although the operation can be avoided, it won"t hurt to report this mistake, but I still want to know the reason and the solution. I hope a great god can answer it.