python中安装matplotlib

xiaoxiao2021-02-28  145

参考网址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() 运行效果:

转载请注明原文地址: https://www.6miu.com/read-23212.html

最新回复(0)