Previously, I introduced the ezplot package and demoed how to use it to make nice looking ggplot2 bar charts easily and quickly. Today, I’m going to show you how to make nice looking boxplots. Once again, the code is super simple.
- Install a set of development tools
- Install devtools by running
Install and Load ezplot
The ezplot package comes with a films dataset obtain from IMBD.com, and I’ll use it to demo boxplots.
First, let’s draw boxplots of budget vs. years.
We see the y-axis tick labels are expressed in scientific notations. This makes it difficult to read. We can use the comma scale on the y-axis, which will display the numbers in 000,000 format.
We also observe that all the boxes are squashed down, indicating budget is heavily right-skewed. We can use either the log scale or the log10 scale on the y-axis. Once again, this can be easily done using the function
I’m writing a book called ezplot: How to Easily Make ggplot2 Graphics for Data Analysis, and it is 20% complete. Take a sneak peek and get notified when the book is published.