How to plot an horizontal line with Python in a Matplotlib or Seaborn chart?

In today’s quick Data visualization tutorial, we will show you how you can easily draw horizontal lines in Python plots that run in parallel to the X axis. We’ll use a bar plot as an example, but you can obviously apply the same logic for other charts such as scatter, histogram, lien plots etc’. Once …

Read moreHow to plot an horizontal line with Python in a Matplotlib or Seaborn chart?

Create a Seaborn countplot using Python: a step by step example

In today’s tutorial we would like to run through a detailed end to end example of Seaborn countplots creation and customization. We’ll be using our deliveries DataFrame as an example. You can grab the file from this location. Step 1: Import thew example dataset Step 2: Create a Seaborn Countplot chart We’ll start by rendering …

Read moreCreate a Seaborn countplot using Python: a step by step example

How to customize Matplotlib plot titles color, position and fonts?

In today’s quick recipe, we’ll learn the basic of Matplotlib title customization. We’ll use bar plots, but the post is fully relevant for other Matplotlib charts: line, scatter, distribution and bar plots. Step 1: Prepare your data for visualization We’ll start by defining a simple dataset for this example. We got a Pandas Series that …

Read moreHow to customize Matplotlib plot titles color, position and fonts?

How to change axes limits in Seaborn (and Matplotlib) with xlim and ylim?

In this quick recipe we’ll learn how to define axis limits for our Seaborn and Matplotlib plots in Python. For convenience, I’ll use Seaborn in this example, but the methods we’ll use in order to resize the axis limits are first and foremost part of Matplotlib and can be used on every pyplot chart. Use …

Read moreHow to change axes limits in Seaborn (and Matplotlib) with xlim and ylim?