Question: Problem with font size in a tree
gravatar for luzglongoria
5 weeks ago by
luzglongoria20 wrote:


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 enter image description here

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

 #Import trees
bTreeH = read.newick(file="Huanuco_bird_tree.newick")
pTreeH ="Huanuco_parasite_tree.nex")

# Prepare parasite Tree
  pTreeH = force.ultrametric(pTreeH)

# Create two fata frames

df.bird.H = data.frame(name = c("Amazilia_chionogaster",

  df.parasite.H = data.frame(Name = c("P_SGS1",

# 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.

ADD COMMENTlink modified 4 weeks ago • written 5 weeks ago by luzglongoria20
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 692 users visited in the last hour