Hi all,
I have a quick question that I think someone could answer for me in a
couple minutes rather than spend 2 hours of my day trying to figure it out.
I want to make a phenogram (or traitagram) showing the evolutionary
trajectory of a trait of a group of fishes. While this would be
sufficient enough for the figure, I think it would be neat to map the color
scheme of the continuous character produced by contMap() onto the branches
of the phenogram. However, I am running into an error and I am not exactly
sure how to fix it. The phenogram plots no problem, the contMap plots no
problem, but I am having trouble combining the two outputs. The error I
keep getting is "Error in plot.xy(xy.coords(x, y), type = type, ...) :
invalid line type"
I have tried to tweak the code so many times to get around this error but I
am finally at a loss. I would appreciate any pointers or tips anyone
could throw my way. My code is below and I am happy to share the data if
needed.
Best,
Lindsey
>phenogram(locate_fossil_phy, fineness_ratio, fsize = 0.5, ftype = "reg",
xlab=NULL, ylab="log Fineness Ratio")
#Create contMap of continuous trait
>obj<-contMap(locate_fossil_phy,fineness_ratio,plot=TRUE, res=50)
>plot(obj,legend=0.75*max(nodeHeights(locate_fossil_phy)),
fsize=c(0.2,.8), lwd=2, label.offset=2,
outline=FALSE, ftype="off", fsize=0.66)
#Change Colors
>obj <- setMap(obj, c("#0000FF","#6600CC", "#FF0000", "#990000")) #Blue to
Red
# Plot phenogram with obj$colors
phenogram(obj$tree,fineness_ratio,colors=obj$cols,spread.labels=TRUE,
spread.cost=c(1,0),fsize=0.3,ftype="reg",lwd=1.25,
ylab="Fineness ratio", ylim=c(0,2.5))
*Error in plot.xy(xy.coords(x, y), type = type, ...) : invalid line type*
*-- *
Lindsey DeHaan
Ph.D. Candidate
Department of Earth and Environmental Sciences
University of Michigan
[[alternative HTML version deleted]]
_______________________________________________
R-sig-phylo mailing list - [email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/[email protected]/