R-code and Plot

Download pdf-file Download png-file


Data as provided


About ggPlotteR

The ggPlotteR Shiny app demonstrates how plots are encoded in R with the ggplot2 package. The code is generated in small steps, i.e. line by line. It uses the philosophy of 'slow ggplot' as described by Evangeline Reynolds in this blog.

The app shows the effect of every user-defined action on the R-code and the plot. The R-code can be retrieved and directly used in R to (re-)create the plot. Hopefully, the app will help to understand the code that is used by ggplot2 to build a plot and lower the barrier to start using ggplot2 from the command line in R.

One of the limitations is that the app does not include all the options provided by ggplot2. This is done on purpose to avoid a cluttered user interface. Users that want to have full control over all features offered by ggplot2 are advised to use R(studio). Still, the code generated by the app could be used as a starting point to generate customized data visualizations.


ggPlotteR is created and maintained by Joachim Goedhart
Bug reports and feature requests can be communicated in several ways:


Source code is available at github/JoachimGoedhart


The code for the shiny app is partially derived from ggplotGUI by Gert Stulp
The idea of line-by-line encoding with ggplot2 is taken from Evangeline Reynolds and beautifully explained in this flipbook (it may take a moment to load the flipbook completely)