Histogram Tutorial with Seaborn Grammar of Graphics API

Seaborn Histogram with facet using Grammar of Graphics API

Seaborn, one of the Python data visualisation libraries had a huge update with Seaborn version 0.12.0 in September 2022. A really exciting development is new API for grammar of graphics like ggplot2. The introduction of seaborn.objects interface is the new API Taking inspiration from Wilkinson’s grammar of graphics — and its implementation in libraries such… Continue reading Histogram Tutorial with Seaborn Grammar of Graphics API

How to Make Heatmap with Matplotlib in Python

Change Heatmap Color Palette in Matplotlib using cmap argument

In this post, we will learn how to make heatmap with Matplotlib in Python. In Matplotlib, we can make heatmap with the function imshow(). imshow() basically shows the input data as image. We will start making a simple heatmap with a one-liner using imshow() first. And then show couple of simple customizations by adding axis… Continue reading How to Make Heatmap with Matplotlib in Python

How to Make Violin plots with Matplotlib

In this tutorial, we will learn how to make violin plots using Python’s Matplotlib library. Matplotlib has a function called violinplot() and we will use that function to examples of making violinplot first and then learn to customize the violinplots. Unlike other tutorials on violinplot with Matplotlib, here we start with data stored in a… Continue reading How to Make Violin plots with Matplotlib

How to View All Matplotlib Plot Styles and Change

Change matplotlib style to fivethirtyeight style

In this tutorial, we will learn how to change the background theme or style of a plot made with matplotlib. Matplotlib offers a number of ready to use styles to use for matplotlib plots. We will first learn how to find the available style options and then learn to set a matplotlib style of interest… Continue reading How to View All Matplotlib Plot Styles and Change

How to Add Vertical/Horizontal Lines to Subplots with Seaborn

Add vertical and Horizontal Lines to "Small multiples" with Seaborn refline

In this tutorial, we will learn how to add vertical or horizontal lines to “small multiples” i.e. multiple subplots of similar kind using Seaborn’s refline() function (h/t to Chris Moffitt of @pbpython). Vertical/Horizontal lines are often useful to show where the mean or median values of the variables of interest and in a simple plot… Continue reading How to Add Vertical/Horizontal Lines to Subplots with Seaborn

Exit mobile version