A box plot is another important graph that summarizes the data along with the distribution. In this recipe, we will produce a box plot to visualize the data summary with the distribution using the ggplot2
implementation.
Recall ggplotdata
for this recipe; we will use the disB
numeric variable over the category of the sex
variable in order to produce a box plot.
The primary code to produce a boxplot is as follows:
ggplot(data=ggplotdata,aes(y=disB,x=sex))+geom_boxplot()
The following figure shows us the visual output of the preceding code:
3.147.63.199