library(xkcd)
gb <- read.delim("../../2018/cmb2/genbank-size.txt", stringsAsFactors=FALSE)
ratioxy <- diff(range(gb$Release))/diff(range(gb$WGS.Bases))
axes <- xkcdaxis(range(gb$Release), range(gb$WGS.Bases))
axes[[3]]$text$family <- "Humor Sans"
man1 <- xkcdman(aes(x = 140, y = 5.0e+11, scale = 8e+10, ratioxy,
angleofspine = -1.704265, anglerighthumerus = -0.5807903,
anglelefthumerus = 3.941945, anglerightradius = 0.0441480,
angleleftradius = 3.222387, anglerightleg = 5.274786,
angleleftleg = 4.349295, angleofneck = -1.820286), data=NULL)
man2 <- xkcdman(aes(x = 196, y = 2.8e+11, scale = 8e+10, ratioxy,
angleofspine = -1.389649, anglerighthumerus = -0.2829418,
anglelefthumerus = 3.379656, anglerightradius = 0.6164104,
angleleftradius = 3.073443, anglerightleg = 5.116607,
angleleftleg = 4.316328, angleofneck = -1.319579), data=NULL)
ggplot(gb, aes(Release,WGS.Bases,label="0")) +
geom_text(family="Humor Sans", alpha=0.8) + axes + man1 + man2 +
theme(plot.background = element_blank()) +
annotate("text", x=160, y=75e10, family="Humor Sans",
label="Genbank data\nkeeps growing!") +
xkcdline(aes(x=145, y=5e11, xend=165, yend=65e10),
data=NULL, xjitteramount = 10)