i

R Programming Complete Tutorial

ggplot2 Box Plot

Boxplot is basically a measure of how well distributed the data is in the data set. It divides the data set into three quantiles. In this example, we are using class and cty data from the mpg data set.

The dark line inside the box represents the median; the data outside the box are known as outliers.

Example of Box Plot:

Graph Output: