教程集 www.jiaochengji.com
教程集 >  Python编程  >  Python入门  >  正文 Python Matplotlib安装过程详解

Python Matplotlib安装过程详解

发布时间:2021-12-03   编辑:jiaochengji.com
教程集为您提供Python Matplotlib安装过程详解等资源,欢迎您收藏本站,我们将为您提供最新的Python Matplotlib安装过程详解资源

Matplotlib 是一个非常优秀的 Python 2D 绘图库,只要给出符合格式的数据,通过 Matplotlib 就可以方便地制作折线图、柱状图、散点图等各种高质量的数据图。

安装 Matplotlib 包与安装其他 Python 包没有区别,同样可以使用 pip 来安装。

启动命令行窗口,在命令行窗口中输入如下命令:

<pre class="brush:html;toolbar:false">pip install matplotlib</pre>

上面命令将会自动安装 Matplotlib 包的最新版本。运行上面命令,可以看到程序先下载 Matplotlib 包,然后提示 Matplotlib 包安装成功:

<pre class="brush:html;toolbar:false">Installing collected packages: matplotlib Successfully installed matplotlib-2.2.3</pre>

如果在命令行窗口中提示找不到 pip 命令,则也可以通过 python 命令运行 pip 模块来安装 Matplotlib 包。

例如,通过如下命令来安装 Matplotlib 包:

<pre class="brush:html;toolbar:false">python -m pip install matplotlib</pre>

在成功安装 Matplotlib 包之后,可以通过 pydoc 来查看 Matplotlib 包的文挡。在命令行窗口中输入如下命令:

<pre class="brush:html;toolbar:false">python -m pydoc -p 8899</pre>

运行上面命令之后,打开浏览器查看 http://localhost:8899/ 页面,可以在 Python 安装目录的 lib\site-packages 下看到 Matplotlib 包的文档,如下图所示

2-1Z30Q51S2596.jpg

<span style="color: rgb(68, 68, 68); font-family: "Helvetica Neue", 微软雅黑, "Microsoft Yahei", Helvetica, Arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);">
</span>

您可能感兴趣的文章:
Python Matplotlib安装过程详解
在python3.7下怎么安装matplotlib
python如何安装库
python库在哪里下载?怎么安装?
python数据分析用什么软件
MySQL安装与python下的MySQLdb使用
盘点Python常用的模块和包
怎样用python加载dicom图片
anaconda和python区别
Mac系统中安装 MySQL-python数据库详解

[关闭]
~ ~