layer will be put in action to explore the power of the grammar of graphics.
ggplotfunctions, first create a
galton_gg <- ggplot(galton,aes(child,parent))and find the most recent creation in R by running
galton_gg. You will get an error, and the graphics device will show a blank screen.
galton_gg <- galton_gg + layer(geom="point"), and then run
galton_ggto check for changes. Yes, you will get a scatter plot of the height of child versus parent.
ggplotis that you can continue to add layers ...