python matplotlib
python上面使用第三方库
Matplotlib从这里下载
自我介绍:
我可以用python创建
静态图
动画
交互的可视化图
Matplotlib can be used in Python scripts, the Python and IPython shell, web application servers, and various graphical user interface toolkits.
我可以出现于
.py文件
python shell
IPython shell
web app servers
GUI 工具
安装:D:\Programs\Python\Python38>python -m pip install matplotlib
Collecting matplotlib
Downloading matplotlib-3.2.1-cp38-cp38-win_amd64.whl (9.2 MB)
|████████████████████████████████| 9.2 MB 3.3 MB/s
Collecting kiwisolver>=1.0.1
Downloading kiwisolver-1.2.0-cp38-none-win_amd64.whl (58 kB)
|████████████████████████████████| 58 kB 1.6 MB/s
Collecting python-dateutil>=2.1
Downloading python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
|████████████████████████████████| 227 kB 3.3 MB/s
Requirement already satisfied: numpy>=1.11 in d:\programs\python\python38\lib\site-packages (from matplotlib) (1.18.2)
Collecting cycler>=0.10
Downloading cycler-0.10.0-py2.py3-none-any.whl (6.5 kB)
Collecting pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1
Downloading pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
|████████████████████████████████| 67 kB 1.8 MB/s
Collecting six>=1.5
Downloading six-1.14.0-py2.py3-none-any.whl (10 kB)
Installing collected packages: kiwisolver, six, python-dateutil, cycler, pyparsing, matplotlib
Successfully installed cycler-0.10.0 kiwisolver-1.2.0 matplotlib-3.2.1pyparsing-2.4.7 python-dateutil-2.8.1 six-1.14.0
注意:在安装第三方库的时候,会顺带安装其他的第三方库。
安装好了,如何使用
from scipy import misc
import matplotlib.pyplot as plt
face=misc.face()
plt.imshow(face)
plt.show()
最好的入门教程
参考