# Matplotlib

Matplotlib is the go-to library for plotting within Python. Numerous packages and libraries build off of Matplotlib, making it the de facto standard Python plotting package. If you were to learn a single plotting tool to keep in your toolbox, this is it.

## Why Matplotlib?

Matplotlib is a plotting library for Python and is often the first plotting package Python learners encounter. You may be wondering, “Why learn Matplotlib? Why not Seaborn or another plotting library first?”

The simple answer to the much-asked question of “why Matplotlib?” is that it is extremely popular; in fact, Matplotlib is one of the most popular Python packages. Because of its history as Python’s “go-to” plotting package, most other open source plotting libraries, including Seaborn, are built on top of Matplotlib; thus, these more specialized plotting packages inherit some of Matplotlib’s capabilities, syntax, and limitations. Thus, you will find it useful to be familiar with Matplotlib when learning other plotting libraries.

Matplotlib supports a variety of output formats, chart types, and interactive options, and runs well on most operating systems and graphic backends. The key features of Matplotlib are its extensibility and the extensive documentation available to the community. All of these things contribute to Matplotlib’s popularity, which is the answer to the question of “Why Matplotlib”, and the reason Matplotlib is the first plotting package we will introduce you to in this book.

## In this section

In this section of Pythia Foundations, you will find tutorials on basic plotting with Matplotlib.

From the Matplotlib documentation, “Matplotlib is a comprehensive library for creating static, animated, and interactive visualizations in Python.”

Currently, Pythia Foundations provides a basic introduction to Matplotlib, as well as:

Histograms

Piecharts

Animations

Annotations

Colorbars

Contour plots

Customizing layouts