- 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.
- Reporting with Visual Studio and Crystal Reports
- 數(shù)據(jù)庫系統(tǒng)教程(第2版)
- Python網(wǎng)絡爬蟲從入門到實踐(第2版)
- 匯編語言程序設計(第2版)
- Java設計模式及實踐
- Visual Basic程序設計與應用實踐教程
- Java EE 8 Application Development
- Python程序設計與算法基礎教程(第2版)(微課版)
- 大話Java:程序設計從入門到精通
- 微課學人工智能Python編程
- JavaScript+jQuery網(wǎng)頁特效設計任務驅動教程
- 數(shù)據(jù)結構:Python語言描述
- Test-Driven iOS Development with Swift
- Java核心技術速學版(第3版)
- 少年小魚的魔法之旅:神奇的Python