Andrea Ridolfi

How to Customize Multiple Subplots in Matplotlib

This article will cover a specific issue that most Python users encounter when using Matplotlib for plotting their graphs. I am talking about defining multiple subplots and being able to access and change their properties individually. In the following sections, we will see how to use the Matplotlib function .subplots() for generating multiple subplots and …

How to Customize Multiple Subplots in Matplotlib Read More »

How to Plot Matplotlib’s Color Palette — and Choose Your Plot Color?

In this article, we’ll learn how to generate the matplotlib color palette and then we will use it to select a specific color for our plot. When presenting data, the color that you assign to a plot is very important; a bad color choice can make your data difficult to understand or even less interesting. …

How to Plot Matplotlib’s Color Palette — and Choose Your Plot Color? Read More »

How to Calculate Percentiles in Python

This article deals with calculating percentiles. Percentiles are statistical indicators that are used to describe specific portions of a sample population. The following sections will explain what percentiles are, what they are used for and how to calculate them, using Python. As you will see, Python allows solving this problem in multiple ways, either by …

How to Calculate Percentiles in Python Read More »

Symbolic Math with SymPy: Advanced Functions and Plots

This article will cover some advanced mathematical functions provided by the Sympy library. If you still have not read the first introductory article to Sympy, you can check it out here. Since most of the basic functions, like the ones for initiating a Sympy session on your terminal or for defining a function/variable, will not …

Symbolic Math with SymPy: Advanced Functions and Plots Read More »

Matplotlib Cursor — How to Add a Cursor and Annotate Your Plot

This article explains how to insert a cursor to your plot, how to customize it and how to store the values that you selected on the plot window. In lots of situations we may want to select and store the coordinates of specific points in our graph; is it just for assessing their value or …

Matplotlib Cursor — How to Add a Cursor and Annotate Your Plot Read More »

Matplotlib Widgets — How to Make Your Plot Interactive With Buttons

This article presents different types of widgets that can be embedded within a matplotlib figure, in order to create and personalize highly interactive plots. Exploiting the matplotlib package .widget(), it is hence possible to create personalized buttons that allows controlling different properties of the graphs that are plotted in the main window. This represents a …

Matplotlib Widgets — How to Make Your Plot Interactive With Buttons Read More »

Matplotlib Widgets — Creating Interactive Plots with Sliders

This article describes how to generate interactive plots by using the .widgets package from the matplotlib library. As can be inferred from the name, the .widgets package allows creating different types of interactive buttons, which can be used for modifying what is displayed in a matplotlib graph. In particular, this article will focus on the …

Matplotlib Widgets — Creating Interactive Plots with Sliders Read More »