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

Pair plot from scratch with tidyverse

Pairplot with Color and Shape

Pair plot is a simple way to quickly visualize the relationship between multiple variables in a dataframe. In this post, we will learn how to make a simple pair plot from scratch between a few quantitative/numerical variables using basic tidyverse functions. (H/T to a twitter user who did something very similar to this for the… Continue reading Pair plot from scratch with tidyverse

How to Add Caption to a Plot in R

Customize Caption Text with element_text()

In this tutorial, we will learn how to add caption to a plot made with ggplot2 in R. Caption in R is a small text at the right corner of a plot that adds some value to the plot. We will use faithful eruption data available from built-in dataset in R. Simple plot with ggplot2… Continue reading How to Add Caption to a Plot in R

How to order boxes in boxplot with fct_reorder in R

Order Boxplot in R

In this tutorial, we will learn how to order boxes in boxplot made with ggplot2 in R. There are a few ways to order boxes in a boxplot. Earlier, we saw how to use base R’s reorder() function to order the boxes in boxplot based on the median values of another variable in the data.… Continue reading How to order boxes in boxplot with fct_reorder in R

Exit mobile version