Sunday, December 18, 2016

Wrap-up & t-shirt design for Bariloche (Argentina) Macroevolution course

I just got back from teaching a five-day workshop the Universidad Nacional del Comahue in San Carlos de Bariloche, Argentina.

It was tiring, but a lot of fun - and I hope it was as rewarding for the students as it was for me.

As has become a tradition in the Latin American workshops that I teach (e.g., 1, 2, 3, 4, etc.), we have a course t-shirt - and, not only that, the t-shirt must be designed in R.

This year's workshop in Bariloche was not spared. Firstly, the design:

library(phytools)
## Loading required package: ape
## Loading required package: maps
library(plotrix)
source("http://www.phytools.org/Bariloche2016/data/arctext.R")
set.seed(545)
tree<-pbtree(n=78,scale=0.8)
txt<-write.tree(tree)
txt<-strsplit(txt,";")[[1]]
txt<-paste("((Y:0.9,",txt,":0.1):0.1,Z:1);",sep="")
tree<-read.tree(text=txt)
tree<-phytools:::lambdaTree(tree,0.95)
tree<-make.era.map(tree,c(0,0.4,0.8))
par(bg="darkgrey")
par(ljoin=1,lmitre=30)
par(mar=rep(0,4))
col<-rgb(red=117/255,green=170/255,blue=219/255)
par(fg="transparent")
plot(tree,colors=setNames(rep("black",3),1:3),
    lwd=10,type="fan",part=0.5,ftype="off",ylim=c(-0.2,1.2),
    lend=1)
par(fg="black")
plot(tree,colors=setNames(c(col,"white",col),1:3),
    lwd=8,type="fan",part=0.5,ftype="off",ylim=c(-0.2,1.2),
    lend=1,add=TRUE)
text(mean(par()$usr[1:2]),-0.15,"Bariloche, Argentina 2016",
    col="black",cex=2.7,font=2)
chars<-strsplit("Latin American Macroevolution Workshop","")[[1]]
stretch<-rep(1.1,length(chars))
arctext("Latin American Macroevolution Workshop",center=c(0,0),radius=1.1,
    cex=3.5,font=2,stretch=stretch)

plot of chunk unnamed-chunk-1

(High resolution PDF with Times font for the text here.)

The only small wrinkle is that I tweaked the code of arctext in the plotrix package to get the text to look the way I wanted it to.

Finally, but most importantly, the students (& me) sporting our t-shirts:

(Click on image for larger version.)

Many thanks to course organizers Lina Moreno Azócar & Félix Cruz, who were wonderful hosts, helped put together a terrific course, and who also had the wonderful patience to drive me back & forth across the border to Chile (no small task) so I didn't have to fly through Buenos Aires!

Until next time Argentina!

No comments:

Post a Comment

Note: due to the very large amount of spam, all comments are now automatically submitted for moderation.