# 3. Matplotlib

![](https://998709212-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MB-ky7fVqjeXA6EcAbW%2F-MBGSBXCuEMwgT1coSTG%2F-MBJnbChJktxqJ0EQRNd%2Flogo2_compressed.svg?alt=media\&token=a076c9ce-fbb9-4af5-9502-e304bb191aca)

[Matplotlib ](https://matplotlib.org/tutorials/index.html)is a plotting library for the [Python](https://en.wikipedia.org/wiki/Python_\(programming_language\)) programming language and its numerical mathematics extension [NumPy](https://en.wikipedia.org/wiki/NumPy). &#x20;

**`Pyplot`** is a Matplotlib module which provides a MATLAB-like interface. Matplotlib is designed to be as usable as MATLAB, with the ability to use Python and the advantage of being free and open-source.

### 1. Installing an official release

Matplotlib and its dependencies are available as wheel packages for macOS, Windows and Linux distributions:

```
python -m pip install -U pip
python -m pip install -U matplotlib
```

###

### 2. Elements of Figure

Matplotlib graphs your data on [**`Figure`**](https://matplotlib.org/api/_as_gen/matplotlib.figure.Figure.html#matplotlib.figure.Figure)s (i.e., windows), each of which can contain one or more [**`Axes`**](https://matplotlib.org/api/axes_api.html#matplotlib.axes.Axes) (i.e., an area where points can be specified in terms of x-y coordinates (or theta-r in a polar plot, or x-y-z in a 3D plot, etc.). The most simple way of creating a figure with axes is using [**`pyplot.subplots`**](https://matplotlib.org/api/_as_gen/matplotlib.pyplot.subplots.html#matplotlib.pyplot.subplots).

{% hint style="info" %}
let's have a deeper look at the components of a Matplotlib figure.
{% endhint %}

![ Anatomy of a figure](https://998709212-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MB-ky7fVqjeXA6EcAbW%2F-MBTVMq_1JbwjjSavJ9-%2F-MBTZt1tdzxKAtUwQkmO%2FAnatomy%20of%20Figure.png?alt=media\&token=051142ad-225a-4b02-ab7a-9466a5084758)

### 3. Check and Quickstart

```
import matplotlib.pyplot as plt   # import the data exploration package
import numpy as np                # import the data computing package
```

### 4. Content

* [3.1 Basic Concepts](matplotlib/basic-plot)
* [3.2 Line Chart](matplotlib/1.2-line-chart-plot)
* [3.3 Area Chart](matplotlib/3.3-area-plot)
* [3.4 Column Chart](matplotlib/1.3-column-chart-plot)
* [3.5 Histogram Chart](matplotlib/1.4-histogram-plot)
* [3.6 Scatter Chart](matplotlib/1.5-pie-chart-plot)
* [3.7 Lollipop Chart](matplotlib/3.7-lollipop-plot)
* [3.8 Pie Chart](matplotlib/untitled)
* [3.9 Venn Chart](matplotlib/3.9-venn-chart)
* [3.10 Waffle Chart](matplotlib/3.10-waffle-chart)
* [3.11 Animation](matplotlib/3.11-animation)
