Sunday, August 2, 2015

Cover image for phytools 'Transmitting Science' workshop in Barcelona

I recently agreed to do a short workshop with the Spanish non-profit company, Transmitting Science. Even though the company seems to put on some very nice courses, I was somewhat torn over this because it makes me somewhat uncomfortable to be charging money (not me, but Transmitting Science - and none of the funds raised will go to me except for reimbursement for my own travel & personal expenses) for something that we would normally happily give away to others for free. Nontheless, I agreed, using the logic that (1) there seems to be unsatisfied demand for graduate/early career scientist workshops on PCMs, (2) Transmitting Science is a registered non-profit, so all the revenue presumably (and I have no reason to doubt this) goes into either putting on this workshop or others, and (3) I want to visit Barcelona.

The course organizer asked me to come up with an image or logo - so I decided to follow my own recent lead and try to create the design entirely in R using the methods of phytools.

Here is what I will send her to post on the course page:

library(phytools)
library(plotrix)
seed<-467 ## chosen because I like the look of the result
set.seed(seed)
tip.label<-replicate(300,paste(sample(LETTERS,1),"._",
    paste(sample(letters,round(runif(n=1,min=4,max=8))),
    collapse=""),sep=""))
tree<-pbtree(n=300,tip.label=tip.label,scale=1)
x<-abs(fastBM(tree))
# create an object of class "contMap"
obj<-contMap(tree,x,plot=FALSE)
plotTree.wBars(obj$tree,x,scale=0.12,tip.labels=TRUE,
    type="fan",method="plotSimmap",colors=obj$cols,fsize=0.25)
draw.circle(0,0,1+max(strwidth(tree$tip.label))*0.25,
    nv=1000,border="transparent",col="#FFFFFF88")
## this is the course title
title<-paste(c("Using phytools","(and other R packages)",
    "to study macroevolution","on phylogenies"),collapse="\n")
text(x=0.01,y=0.01,title,cex=2,col="grey",font=2) ## a shadow
text(x=0,y=0,title,cex=2,font=2)

plot of chunk unnamed-chunk-1

We can also create a version without the aliasing by exporting as a PDF file:

pdf("Revell-transmitting.science.pdf")
plotTree.wBars(obj$tree,x,scale=0.12,tip.labels=TRUE,
    type="fan",method="plotSimmap",colors=obj$cols,fsize=0.25)
draw.circle(0,0,1+max(strwidth(tree$tip.label))*0.25,
    nv=1000,border="transparent",col="#FFFFFF88")
title<-paste(c("Using phytools","(and other R packages)",
    "to study macroevolution","on phylogenies"),collapse="\n")
text(x=0.01,y=0.01,title,cex=2,col="grey",font=2)
text(x=0,y=0,title,cex=2,font=2)
dev.off()
## png 
##   2

Check it out here.

When the course is advertised I will note it on this page, of course.

I will also be giving a half-day (free!) workshop at the XVI Congreso Argentino de Herpetología in Tucumán, Argentina. More information can be seen on the meeting website.

1 comment:

  1. OK, I've been corrected. Evidently Transmitting Science is not formally a non-profit organization, as the rules governing such organizations are different in Spain than they are in the U.S. - but they operate similarly to a U.S. non-profit organization.

    ReplyDelete

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