ggflags, I've been learning a lot about how ggplot2 builds up gTrees in Grid to compose a plot. I've been thinking about an idea for a package that would basically ingest a
ggplot object and spit out a bunch of numbered SVGs with the different elements of the plot—using the same plotting space but with transparent backgrounds, so that the SVGs could be overlaid to 'build a plot up' when presenting. It could potentially also integrate with other packages like
officer, so that you could knock out a Powerpoint slide that has the layers positioned and animated per-click right off the bat.
Can anyone point me to either:
- A package that already does this (so I don't go reinventing the wheel), or
- Resources on how ggplot arranges its hierarchy in Grid, so I can start thinking about how to identify the elements to isolate?