A christmas card made withggplot2
On/around Christmas Eve 2019, I saw this old XKCD comic.
Since I was working with visualizing network data at the time, I realized that I could probably render the tree in the comic with ggplot2
relatively easily. Over the course of a few hours, it evolved into this Christmas card.
I mean, maybe mostly, but this effort is not completely ridiculous. Feel free to disagree, though you are wrong if you do.
It's a good exercise for learning advanced ggplot2 techniques, including:
- Plotting networks using
igraph
,network
, andggnetwork
packages - Controlling order of layers by using
subset
- Determining plotting locations of some elements based on other elements (presents under the tree)
- Supervised randomness of locations of certain elements (presents and snowflakes)
- Implementing different color scales for different
geom
s usingggnewscale
Also, it's simply a good example of making art with R; it's aRt. And it's christmas-y and cute. It's like when your grandma cross-stitches reindeer on a pillow, just with computers and a 32 year old man.