dput.ggedit {ggedit} | R Documentation |
Convert ggplot object to a string call
Description
Convert ggplot object to a string call
Usage
dput.ggedit(obj, file = "")
Arguments
obj |
compiled ggplot object |
file |
either a character string naming a file or a connection. " " indicates output to the console, Default: " " |
Value
character
Examples
pList$pointSmooth #original compiled plot
this.gg <- dput.ggedit(pList$pointSmooth) #dput the plot
writeLines(this.gg) #show the output
eval(parse(text=this.gg)) #recompile the plot
#add theme change
p <- pList$pointSmooth+theme(panel.background = element_rect(fill='green'))
this.gg<-dput.ggedit(p) #dput the plot
writeLines(this.gg) #show the output
eval(parse(text=this.gg)) #recompile the plot
[Package ggedit version 0.4.1 Index]