Hello everyone , I meet you again , I'm your friend, Quan Jun .
First of all, my reference is :http://www.cnblogs.com/lifegoesonitself/p/3443866.html
I have encountered all the problems in this blog post , The first is the general process :
matplotlib yes python The most famous gallery , It offers a complete set and matlab Similar orders API, Great for interactively
Mapping .Matplotlib Please refer to The website links http://matplotlib.org/users/installing.html
The following steps are summarized :
windows On the platform download .exe Format Direct installation .
1,python Download and install Download address .
2, Install the version you need ( This should follow the steps 1 Of python edition ) Of Matplotlib, Download address .
The following installation Matplotlib Dependent Library
3, For the Standard Version Python Come on , To use Matplotlib, It also needs to be installed numpy modular , Download address .
4, msvcp71.dll, On some systems , You may also need download msvcp71.dll library . download
This file , Unzip it and drag it to c:\windows\system32 Directory .
5, Run a simple program example :
import matplotlib.pyplot as plt
plt.plot([1,2,3])
plt.ylabel('some numbers')
plt.show()
The first mistake is :ImportError: No module named six
Need to download and install six modular :
https://pypi.python.org/pypi/six/
download six-1.4.1.tar.gz package , decompression , The inside six.py Files in c disc python27 The directory Lib Next . such python You can use this directly six.py The library .
The following error was found :
raise ImportError(“matplotlib requires dateutil”) ImportError: matplotlib requires dateutil
This needs to be dateutil, You can come here download install .
hold dateutil After installation, the following error occurs again :
raise ImportError(“matplotlib requires pyparsing”) ImportError: matplotlib requires pyparsing
need pyparsing Come here download install .
Complete the above steps , Run the above example to display our image , As shown below .
In the process of program installation, if you encounter some dependent packages that need to be installed , You can go to Look here for ( Am I ), It's really a good resource .
According to the needs of the drawing Select the appropriate graphic in the link below Make changes , Draw the image you need .
example: http://matplotlib.org/examples/index.html, gallery:http://matplotlib.org/gallery.html
Pay attention to the Chinese solution when drawing , stay .py Add the following to the header of the document :
I refer to this blog to install python matplotlib The required software is put on Baidu network disk , Sure Come here . Thank you for your selfless sharing !!
If you want to Python The script is published as detached Python Executable programs running on the platform , Like a single one exe file .
You can refer to this post :http://blog.csdn.net/daniel_ustc/article/details/15501385
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/150606.html Link to the original text :https://javaforall.cn