Skip to content

Latest commit

 

History

History
26 lines (22 loc) · 963 Bytes

File metadata and controls

26 lines (22 loc) · 963 Bytes
title Introduction
teaching 60
exercises 30
questions
Why to use Matplotlib for HEP?
What kind of plots can be done?
objectives
Understand the basics of Matplotlib
Learn how to manipulate the elements of a plot
keypoints
Matplotlib graphs data in Figures, each of which can contain components that can be manipulated: axis, legend, labels, etc.
Many kinds of plots can be produced: scatter plots, bar plots, pie charts, and many more

The example-based nature of Matplotlib documentation is GREAT.

Matplotlib is the standard when it comes to making plots in Python. It is versatile and allows for lots of functionality and different ways to produce many plots. We will be focusing on using matplotlib for High Energy Physics.

A simple example

As with any Python code it is always good practice to import the necessary libraries as a first step.

import matplotlib.pyplot as plt