Skip to content

Matplotlib

Skip to the problems!

Matplotlib is a comprehensive library for creating static, animated, and interactive visualizations in Python. Matplotlib makes easy things easy and hard things possible.

See the official Matplotlib site for details and documentation.

How to install matplotlib

pip install matplotlib

See the official Matplotlib installation guide for details and alternatives.

How to import matplotlib

By convention,

import matplotlib as mpl

although most people only import the pyplot module.

import matplotlib.pyplot as plt