ggedit
packageThe package is a ggplot2
editor. The ggedit
package is part of RStudio Addins.
We first generate a chart.
library(ggplot2)
<- ggplot(mtcars, aes(x = hp, y = wt)) +
p geom_point() +
geom_smooth(linetype=2, size=2, colour='#4876FF')
p
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'
We then clone the original chart p
and ‘ggedit’ p2
. Or we highlight the ggplot2
plot and launch the addin.
<- p
p2
library(ggedit)
<- ggedit(p) p2
Finally, we presh the ‘Done’ button and show the updated plot.
plot(p2)
More about the object.
names(p2)