matplotlib安装方法

您所在的位置:网站首页 matplotlip安装 matplotlib安装方法

matplotlib安装方法

#matplotlib安装方法| 来源: 网络整理| 查看: 265

matplotlib安装方法_matplotlib使用教程在网上看见许多matplotlib的安装教程都是比较复杂,需要配置许多环境,对于电脑基础不好的人来说可是一件头疼的事情,今天我介绍一个简单的安装方法。1.Win+R输入cmd进入到CMD窗口下,执行python-mpipinstall-Upipsetuptools进行升级。2.输入python-mpipinstallmatplotlib进行自动的安装,系统会自动下载... 大家好,我是架构君,一个会写代码吟诗的架构师。今天说一说matplotlib安装方法_matplotlib使用教程,希望能够帮助大家进步!!!

在网上看见许多matplotlib的安装教程都是比较复杂,需要配置许多环境,对于电脑基础不好的人来说可是一件头疼的事情,今天我介绍一个简单的安装方法。

1.Win+R输入cmd进入到CMD窗口下,执行python -m pip install -U pip setuptools进行升级。

matplotlib安装方法_matplotlib使用教程

2.输入python -m pip install matplotlib进行自动的安装,系统会自动下载安装包

matplotlib安装方法_matplotlib使用教程

3.进入到python idle中,运行import matplotlib,如下图所示,如果没有报错,就证明安装成果。

matplotlib安装方法_matplotlib使用教程

输入以下代码运行成果证明安装没问题

import matplotlib.pyplot as plt labels='frogs','hogs','dogs','logs' sizes=15,20,45,10 colors='yellowgreen','gold','lightskyblue','lightcoral' explode=0,0.1,0,0 plt.pie(sizes,explode=explode,labels=labels,colors=colors,autopct='%1.1f%%',shadow=True,startangle=50) plt.axis('equal') plt.show() 只听到从架构师办公室传来架构君的声音: 鸣鞘声里绣旗红。有谁来对上联或下联?

matplotlib安装方法_matplotlib使用教程

公众号:好玩的MATLAB

matplotlib安装方法_matplotlib使用教程

 

今天文章到此就结束了,感谢您的阅读,Java架构师必看祝您升职加薪,年年好运。



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3