我有这个代码:
import matplotlib.pyplot as p1lt
#define data
x = [1, 2, 3, 4, 5, 6]
y = [3, 7, 14, 19, 15, 11]
#create line plot
p1lt.plot(x, y)
#show line plot
p1lt.show()
Run Code Online (Sandbox Code Playgroud)
我收到一条错误消息:
Matplotlib support failed
Traceback (most recent call last):
File "C:\Users\G\AppData\Roaming\JetBrains\IdeaIC2022.2\plugins\python-ce\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 25, in do_import
succeeded = activate_func()
File "C:\Users\G\AppData\Roaming\JetBrains\IdeaIC2022.2\plugins\python-ce\helpers\pydev\_pydev_bundle\pydev_code_executor.py", line 29, in <lambda>
"matplotlib": lambda: activate_matplotlib(self.enableGui),
File "C:\Users\G\AppData\Roaming\JetBrains\IdeaIC2022.2\plugins\python-ce\helpers\pydev\pydev_ipython\matplotlibtools.py", line 110, in activate_matplotlib
gui, backend = find_gui_and_backend()
File "C:\Users\G\AppData\Roaming\JetBrains\IdeaIC2022.2\plugins\python-ce\helpers\pydev\pydev_ipython\matplotlibtools.py", line 47, in find_gui_and_backend
backend = matplotlib.rcParams['backend']
File "D:\books\programming\python17\lib\site-packages\matplotlib\__init__.py", …Run Code Online (Sandbox Code Playgroud)