19.10 Adding adornment

It’s everything else after the legend step that we saw in the gifs above. It looks trivial but this step we’re glossing over is ~150 lines of code. But it’s not super complicated - just a lot of if-else statements and a handful of low-level {grid} and {gtable} functions.

19.10.1 Output

To put it all together:

p_built <- ggplot_build(p)
p_gtable <- ggplot_gtable(p_built)
grid.newpage()
grid.draw(p_gtable)