X<-"((A:{aqua,0.3:terr,0.4:aqua,0.3},B:{aqua,1.0}):{aqua,1.0},(C:{aqua,0.25:terr,0.75},D:{aqua,1.0}):{aqua,1.0});"
phy<-read.simmap(text=X)
leg<-c("blue","red"); names(leg)<-c("aqua","terr")
plotSimmap(phy,leg,ftype="i")
Run the code above in your browser using DataLab