- Interactive Applications Using Matplotlib
- Benjamin V. Root
- 437字
- 2021-07-23 20:02:18
Installing Matplotlib
There are many ways to install Matplotlib on your system. While the library used to have a reputation for being difficult to install on non-Linux systems, it has come a long way since then, along with the rest of the Python ecosystem. Refer to the following command:
$ pip install matplotlib
Most likely, the preceding command would work just fine from the command line. Python Wheels (the next-generation Python package format that has replaced "eggs") for Matplotlib are now available from PyPi for Windows and Mac OS X systems. This method would also work for Linux users; however, it might be more favorable to install it via the system's built-in package manager.
While the core Matplotlib library can be installed with few dependencies, it is a part of a much larger scientific computing ecosystem known as SciPy. Displaying your data is often the easiest part of your application. Processing it is much more difficult, and the SciPy ecosystem most likely has the packages you need to do that. For basic numerical processing and N-dimensional data arrays, there is NumPy. For more advanced but general data processing tools, there is the SciPy package (the name was so catchy, it ended up being used to refer to many different things in the community). For more domain-specific needs, there are "Sci-Kits" such as scikit-learn
for artificial intelligence, scikit-image
for image processing, and statsmodels
for statistical modeling. Another very useful library for data processing is pandas
.
This was just a short summary of the packages available in the SciPy ecosystem. Manually managing all of their installations, updates, and dependencies would be difficult for many who just simply want to use the tools. Luckily, there are several distributions of the SciPy Stack available that can keep the menagerie under control. The following are Python distributions that include the SciPy Stack along with many other popular Python packages or make the packages easily available through package management software:
Note
For this book, we will assume at least Python 2.7 or 3.2. The requisite packages are numpy
, matplotlib
, basemap
, and scipy
. Just about any version of these packages released in the past 3 years should work for most examples in this book (exceptions are noted in this book). The version 0.14.0 of SciPy (released in May 2014) cannot be used in this book due to a (now fixed) regression in its NetCDF reader. Chapter 5, Embedding Matplotlib will have special notes with regards to GUI toolkit packages.
- Vue.js 3.x快速入門
- JavaScript從入門到精通(微視頻精編版)
- 微服務與事件驅動架構
- Java面向對象思想與程序設計
- Getting Started with ResearchKit
- 深入淺出Java虛擬機:JVM原理與實戰
- iOS開發實戰:從零基礎到App Store上架
- 深入淺出Windows API程序設計:編程基礎篇
- Processing互動編程藝術
- Learning Neo4j 3.x(Second Edition)
- VMware虛擬化技術
- 精通Linux(第2版)
- PHP 7+MySQL 8動態網站開發從入門到精通(視頻教學版)
- 運用后端技術處理業務邏輯(藍橋杯軟件大賽培訓教材-Java方向)
- Java實戰(第2版)