Apr-26-2024, 04:16 PM
(Apr-26-2024, 01:14 AM)deanhystad Wrote: How did you install matplotlib? Import does not install a package.I went to matplotlib's website and did a bunch of things that it seemed to be telling me to do to get matplotlib. I'm not sure how to check what you're asking, though I'll repost.
import matplotlib.pyplot as plt import numpy as np # Fixing random state for reproducibility np.random.seed(19680801) N = 50 x = np.random.rand(N) y = np.random.rand(N) colors = np.random.rand(N) area = (30 * np.random.rand(N))**2 # 0 to 15 point radii plt.scatter(x, y, s=area, c=colors, alpha=0.5) plt.show()and here's the error:
Error:= RESTART: C:\Users\richb\AppData\Local\Programs\Python\Python312\Lib\idlelib\scatter_plot.py
Traceback (most recent call last):
File "C:\Users\richb\AppData\Local\Programs\Python\Python312\Lib\idlelib\scatter_plot.py", line 1, in <module>
import matplotlib.pyplot as plt
ModuleNotFoundError: No module named 'matplotlib'