参考网址http://matplotlib.org/users/installing.html
在控制台中分别输入:
python -m pip install -U pip setuptools
python -m pip install matplotlib
然后在项目的文件中,创建一个测试文件
import matplotlib.pyplot as plt
squares = [1, 4, 9, 16, 25 , 18 , 21]
plt.plot(squares)
plt.show()
运行效果: