Matplotlib:

  • is a popular Python plotting library used to create charts and visualizations from data.

Can create:

  • Line charts (plot)
  • Scatter plots (scatter)
  • Bar charts (bar)
  • Histograms (hist)
  • Saving figures to image files like PNG/SVG (savefig)

Install matplotlib

pip install matplotlib

pyplot is a submodule of Matplotlib that provides the easy, quick plotting interface.

import matplotlib.pyplot as plt