Skip to content

mtandon09/ggplot_christmas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ggplot_christmas

A christmas card made withggplot2

Motivation

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.

Reasons why this isn't completely stupid

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, and ggnetwork 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 geoms using ggnewscale

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.

Output

alt text

About

A christmas card made with ggplot2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages