- 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.
- Drupal 8 Blueprints
- 零基礎玩轉(zhuǎn)區(qū)塊鏈
- Mastering Natural Language Processing with Python
- Oracle 12c中文版數(shù)據(jù)庫管理、應用與開發(fā)實踐教程 (清華電腦學堂)
- Java游戲服務器架構實戰(zhàn)
- Learning Informatica PowerCenter 10.x(Second Edition)
- Mastering Kali Linux for Web Penetration Testing
- 編譯系統(tǒng)透視:圖解編譯原理
- Node.js全程實例
- Swift細致入門與最佳實踐
- Mastering Linux Security and Hardening
- 深入剖析Java虛擬機:源碼剖析與實例詳解(基礎卷)
- Spring+Spring MVC+MyBatis從零開始學
- Scratch趣味編程:陪孩子像搭積木一樣學編程
- Python:Deeper Insights into Machine Learning