| ggplotGrob {ggplot2} | R Documentation |
Build a plot with all the usual bits and pieces.
ggplotGrob(plot, drop = plot$options$drop, keep = plot$options$keep, ...)
plot |
plot |
drop |
plot grob |
keep |
|
... |
As well as the plotting area, a plot needs:
main title
x and y axis labels
space for legends (currently on the right hand side)
These are stored as options in the plot object.
This function sets up the appropriate viewports and packs the various components in. The viewport is set up so that each component will only take up the amount of space that it requires.
Hadley Wickham <h.wickham@gmail.com>