Interactive 'ggplot2' Layer and Theme Aesthetic Editor

Interactively edit 'ggplot2' layer and theme aesthetics definitions.

CRAN_Status_Badge Project Status: Active - The project has reached a stable, usable state and is being actively developed. downloads

ggplot2 has become the standard of plotting in R for many users. New users, however, may find the learning curve steep at first, and more experienced users may find it challenging to keep track of all the options (especially in the theme!).

ggedit is a package that helps users bridge the gap between making a plot and getting all of those pesky plot aesthetics just right, all while keeping everything portable for further research and collaboration.

ggedit is powered by a Shiny gadget where the user inputs a ggplot plot object or a list of ggplot objects. You can run ggedit directly from the console or from the Addin menu within RStudio.

Online User Manual Gitbook

A gitbook is maintained as the user manual for the package, you can access it here:

Short clip from rstudio::conf 2017 (13:40-19:40)

User Lightning Talks – RStudio




For a quick example, run the following:

p <- ggplot(mtcars, aes(x = hp, y = wt)) + geom_point() + geom_smooth()
p2 <- ggedit(p)
names(p2) # will show you which objects are available.
plot(p2) # shows the updated plot (it is available in the first element of p2)



DEV updates ggedit_0.2.1

  • print.ggedit: S3 method to print directly from the output object to the console the script to reproduce changes on the original plot object
  • compare: compare two theme objects and return script or new theme object with only the differences between the two
  • call to ggedit is now ggedit(,...), where the following arguments can be passed in to the ellipses
    • viewer shiny viewer options. It can be either paneViewer (default with minHeight=1000), dialogViewer, browserViewer

    • verbose logical to control if the output includes script for layers and themes calls for parsing to create objects (default, verbose=TRUE)

    • showDefaults toggle to control if the verbose output shows all the input arguments passed to the proto object (if verbose==FALSE then ignored)

    • width,height dimensions of the renderPlot where the active plot is displayed


  • layers
    • non colour aesthetics of numeric inputs are not currently supported, e.g.: iris%>%ggplot(aes(x=Sepal.Length,y=Sepal.Width))+geom_point()+geom_text(aes(label=Species,size=Sepal.Length))
    • geom_text: family is not currently open to change
  • theme
    • margin,arrow are not currently available to edit


Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.2.1 by Jonathan Sidi, a year ago

Report a bug at

Browse source code at

Authors: Jonathan Sidi [aut, cre]

Documentation:   PDF Manual  

GPL-2 | GPL-3 license

Imports plyr, reshape2, rstudioapi, utils, colourpicker, scales, graphics, shinyAce, grid, miniUI

Depends on shiny, shinyBS, ggplot2, dplyr

See at CRAN