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 more

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 more

Pandas: how to plot timeseries based charts?

In this quick recipe we’ll learn how to quickly create a chart that displays time series key performance indicator data. Let’s quickly start by creating some random data for this exercise: Here’s our dataframe header: time sales 0 2020-01-01 79 1 2020-02-01 91 2 2020-03-01 87 3 2020-04-01 74 4 2020-05-01 66 Using DataFrame.plot() to … Read more

Rotate axis tick labels in Seaborn and Matplotlib

In today’s quick tutorial we’ll cover the basics of labels rotation in Seaborn and Matplotlib. For convenience examples will be based on Seaborn charts, but they are fully relevant to Matplotlib. Here’s a Python snippet that builds a simple Seaborn barplot (sns.barplot). I assume that you have already imported Matplotlib and / or Seaborn to … Read more

How to set the title and fonts of your Seaborn Chart?

In today’s recipe we’ll learn about Seaborn title objects for charts and axes. We’ll see how we can quickly set and change them and apply some customization to improve your Python charts look and feel. Using set_title to add a title to your chart Seaborn leverages the Matplotlib plt.set_title method to define your chart title … Read more