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

How To Add Mean/Median Line to a Seaborn Displot

Seaborn displot with median line

In this tutorial, we will learn how to add mean or median vertical line to a plot made with Seaborn’s displot() function. Seaborn’s displot() offers capability to visualize the univariate or bivariate distribution of data. Here we will make a histogram with Seaborn’s displot() and then see how to add median line to the histogram,… Continue reading How To Add Mean/Median Line to a Seaborn Displot

How To Add Dollar Sign on Axis Ticks in Matplotlib

Barplot with dollar sign on axis ticks

In this tutorial, we will see examples of how to add dollar sign on axis ticks while making plots with Matplotlib in Python. While making plots to understand the relationship between currency like US dollars and other variables, it is better to show the Dollar symbol/sign on the axis ticks instead of numbers. Let us… Continue reading How To Add Dollar Sign on Axis Ticks in Matplotlib

How To Annotate Barplot with bar_label() in Matplotlib

Customize Label Size Matplotlib's bar_label()

Annotating barplots with labels like texts or numerical values can be helpful to make the plot look better. Till now, one of the options add annotations in Matplotlib is to use pyplot’s annotate() function. Starting from Matplotlib version 3.4.2 and above, we have a new function, axes.bar_label() that lets you annotate barplots with labels easily.… Continue reading How To Annotate Barplot with bar_label() in Matplotlib

How To Connect Paired Data Points with Lines in Scatter Plot with Matplotlib

Connect Paired Points with Lines in Matplotlib

In this tutorial, we will learn how to connect paired data points with lines in a scatter plot using Matplotlib in python. Adding lines to paired data points can be extremely helpful in understanding the relationship between two variables with respect to a third variable. Mainly we use Matplotlib’s plot() function and scatter() function to… Continue reading How To Connect Paired Data Points with Lines in Scatter Plot with Matplotlib

Exit mobile version