Use pip Python module installed matplotlib

matplotlib python is the powerful drawing modules.

First, be sure to install python, and then use pip to install matplotlib module.

Into the cmd window, the execution python -m pip install -U pip setuptools upgrade.

Then type python -m pip install matplotlib automatic installation, the system will automatically download the package.

After the installation is complete, you can view all the modules of the machine installed with python -m pip list, make sure matplotlib has been successfully installed.

 

Into the python idle , run import matplotlib, as shown below, if there is no error prompt, it is ready for use.

 

Source: https://www.cnblogs.com/-1307/p/6529269.html

==============================================================================

 

Many see online installation tutorial matplotlib are more complex and requires a lot of configuration environment, bad for the computer-based people, but a difficult thing, today I introduce a simple installation method.

1.Win + R input into the next CMD cmd window, perform python -m pip install -U pip setuptools upgrade.

2. Enter the python -m pip install matplotlib automatic installation, the system will automatically download the package

 

3 into the python idle running import matplotlib, as shown below, if there is no error, as evidenced by the installation results.

Enter the following code to run the results proved no problem to install

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.show()

 

 

 

 

 

出处:https://blog.csdn.net/zzx2016zzx/article/details/83099583

matplotlib是python中强大的画图模块。

首先确保已经安装python,然后用pip来安装matplotlib模块。

进入到cmd窗口下,执行python -m pip install -U pip setuptools进行升级。

接着键入python -m pip install matplotlib进行自动的安装,系统会自动下载安装包。

安装完成后,可以用python -m pip list查看本机的安装的所有模块,确保matplotlib已经安装成功。

 

进入到python idle中,运行import matplotlib,如下图所示,如果没有报错提示,那就可以开始使用了。

Guess you like

Origin www.cnblogs.com/mq0036/p/11418382.html