Hi,
I am trying to make an interaction between two phylogenetic trees. I am able to run all the code (no errors) the problem is that the size of the letter of one of the trees is too big
I have been able to change the size by plotting the plot and asking R to minimize the size but the problem is that I want to use the tree for an interaction with another tree. Please, see below:
# Packages
library(Matrix)
library(lme4)
library(ape)
library(maps)
library(phytools)
#Import trees
bTreeH = read.newick(file="Huanuco_bird_tree.newick")
pTreeH = read.nexus(file="Huanuco_parasite_tree.nex")
# Prepare parasite Tree
pTreeH = force.ultrametric(pTreeH)
# Create two fata frames
df.bird.H = data.frame(name = c("Amazilia_chionogaster",
"Carduelis_magellanica",
"Colibri_coruscans",
"Sayornis_nigricans",
"Sayornis_nigricans",
"Serpophaga_cinerea",
"Serpophaga_cinerea",
"Thraupis_episcopus",
"Zonotrichia_capensis",
"Zonotrichia_capensis",
"Zonotrichia_capensis",
"Zonotrichia_capensis"))
df.parasite.H = data.frame(Name = c("P_SGS1",
"H_PYERY01",
"P_SGS1",
"P_SGS1",
"P_PHPAT01_",
"P_SGS1",
"H_SERCIN01",
"H_STTA17H",
"P_BAEBIC02_",
"H_CHLOP01_",
"P_SGS1",
"H_ZOCAP01"))
# Creation of the association matrix:
associationH <- cbind(df.bird.H, df.parasite.H)
# Create a vector for colors
cols.H <- c('2','1','2','2','1','2','1','1','1','1','2','1')
# Create a vector for chose colors
cols.1.H <- c("#e7298a","grey","#e7298a","#e7298a","grey","#e7298a","grey","grey","grey","grey","#e7298a","grey") #1
# Create the two trees face to face
Interaction_Huanuco <- cophyloplot(bTreeH, pTreeH, assoc=associationH,
length.line = 4, space = 100, gap = 3, col = cols.1.H)
There is no error message but the bTreeH (the one with more names) is imposible to read properly because of the size of the letters. Some months ago I was able to run these analyses with any trouble, the size of the letters seemed to adjust itself but now... I am running exactly the same code and I have this problem.
Any help is more than welcome.