This lesson is being piloted (Beta version)

Matplotlib for HEP: Setup

Binder setup

For this tutorial we will be using Binder. It offers a no setup, click and ready to go Jupyter Notebook environment.

We will be using the following Github Repository to follow the lesson.

You would only need to look for the Binder

Binder is good for live coding sessions and thus has a 10-20 min inactivity timeout. If this occurs during the session follow these steps (they should work most of the time)

Plan B: Google Colab

If for whatever reason Binder is not working. All notebooks should have a Open In Colab Just click and run the cells that say If on Colab

This only requires the user to have a Google account but it is much more stable and does not have the inactivity limit like Binder.

Some details on Google Colab:

Plan C: SWAN

SWAN is a CERN based notebook hosting service. It is stable like Colab and setup is easy like Binder. Simply click on the Badge below and log in to SWAN with your CERN account.


If you want to run locally

We highly recommend you create a virtual environment first. Open your terminal and do

conda create --name mpl
conda activate mpl
git clone
cd hsf_matplotlib_notebooks
# Now install the requirements
conda install -c conda-forge --file requirements.txt
conda install notebook jupyterlab

Now you can launch your jupyter notebook or jupyter-lab session

jupyter notebook --no-browser
# Or
jupyter lab --no-browser

Then copy one of the urls printed on the terminal window and paste in your browser.

Your feedback is very welcome! Most helpful for us is if you “Improve this page on GitHub”. If you prefer anonymous feedback, please fill this form.