程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Python learning - Matplotlib (introduction and installation)

編輯:Python

matplotlib package

In this case study , Will make use of Matplotlib Package for visual analysis of data , Draw relevant charts , Data analysis .
(1) Basic introduction
Matplotlib yes Python Drawing library of . It can be connected with NumPy Use it together , Provides an effective MatLab Open source alternatives . It can also be used with the graphics toolkit , Such as PyQt and wxPython.

(2)matplotlib install :
Linux System
Situation 1 、 If you're using the system's own Python edition , You can use the system's package manager to install matplotlib, To do this, just execute a single command :

$ sudo apt-get install python3-matplotlib

Case 2 、 If you're using Python 2.7

$ sudo apt-get install python-matplotlib

Situation 3 、 If you install a newer Python edition , It has to be installed matplotlib Some of the libraries that you depend on :

$ sudo apt-get install python3.5-dev python3.5-tk tk-dev $ sudo apt-get install libfreetype6-dev g++

Reuse pip To install matplotlib:

$ pip install --user matplotlib

OS X System
Apple Standards for Python Installation comes with matplotlib.
If it passes the inspection , Found no , Then install through the following statement

$ pip install --user matplotlib

【 Be careful 】: You may need to use... When installing packages pip3 , instead of pip . in addition , If this command doesn't work , You may need to delete the flag –user.

Windows System
stay Windows In the system , Installation is required first VisualStudio.
Method 1 、 Download the image installation package
Please visit https://pypi.python.org/pypi/matplotlib/ , And find the... That you use Python The version matches wheel file ( extension .whl The file of ). for example , If you make It's using 32 Bit Python 3.5, You need to download matplotlib-1.4.3-cp35-none-win32.whl.
Method 2 、 Command line pip Installation

pip install matplotlib

Method 3 、 If you use pycharm development tool , Then the program can be in setting Installation in
setting–>project–>Python Interpreter After entering , choice pip, Select Search matplotlib, Then install .


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved