In this chapter, we will cover the following recipes:
In this chapter, we will look at box and whisker plots in detail, which are a great form of visualization to summarize large amounts of data by showing Tukey's five-number summary: minimum, lower-hinge, median, upper-hinge, and maximum. Box plots are a good way to spot outliers and compare the key statistics for different variables or groups.
We will learn various stylistic and structural variations on how to adjust box plots in R (using the basic boxplot()
command). In addition to changing the look of our box plots, we will also learn how to add additional useful information to them. We will start by looking at some basic arguments to change individual aspects of a box plot and slowly move to more advanced recipes that involve the use of multiple function calls and arguments to create more complex types of box plots.
As with the previous chapters, it's best to try out each recipe first with the example shown here and then with your own datasets so that you can fully understand each line of code.
3.129.195.45