Updated October 4, 2018
Do you love ggplot2
? If you’ve worked with ggplot2 before, you know
it often takes many lines of code to get a satisfying plot. The ggplot2 language has too many “words” and “expressions”, which are difficult to remember and time consuming to look up. Wouldn’t it be awesome if there’s a simpler tool? The answer is ezplot. It’s a package based off ggplot2 that allows user to create high quality ggplot2 charts with zero or minimal effort of customization. In this and the next few posts, I’ll demo how to use ezplot.
Prerequisites
- Install a set of development tools
- On Windows, download and install Rtools.
- On Mac, install the Xcode command line tools.
- On Linux, install the R development package, usually called r-devel or r-base-dev.
- Install devtools by running
install.packages("devtools")
in R. - Install ezplot by running
devtools::install_github("gmlang/ezplot")
in R.
Load ezplot and dplyr
Generate some fake data
Make simple bar chart
Generate some fake data again
Make dodged bar chart
I wrote ezplot to improve efficiency. Hope it can also help you. Drop a comment below if you have any questions.