Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

theme_tree2 scale bar width #613

Open
cabraham03 opened this issue Apr 17, 2024 · 0 comments
Open

theme_tree2 scale bar width #613

cabraham03 opened this issue Apr 17, 2024 · 0 comments

Comments

@cabraham03
Copy link

Hi, I just want to know how to increase the width in the scale bar using theme_tree2, I'm using the default parameters for theme_tree2. to generate the tree I use the size of 1 [Ptree <-ggtree(treeUPGMA, size=1)], so I just want that the width in the scale bar to be close to the size in the line of the tree, maybe ~0.8. Any suggestion ?

Ptree + 
    geom_text(aes(label=bootstrap, hjust=hj, vjust=vj), size=3.7) + theme_tree2() + 
    geom_nodelab(aes(subset = (node == 23), label = "A-genotype"), color = "black", nudge_x = -0.0006, nudge_y = 0.6, hjust = 1, size=5.5) + 
    geom_nodelab(aes(subset = (node == 24), label = "B-genotype"), color = "black", nudge_x = -0.0006, nudge_y = 0.6, hjust = 1, size=5.5) + 
    geom_tippoint(aes(shape=vcg), size=3.5, alpha=0.7, x=0.02025) + 
    scale_shape_manual(values = c(15,19), labels=lbs) +  
    theme(legend.position=c(0.12, 0.75),                        
          legend.title=element_blank(),                         
          legend.text=element_text(size=17, family="Times New Roman", face = "italic"),  
          # Scale font size
          axis.text.x=element_text(size=10, family="Times New Roman", face = "bold"), 
          plot.margin = unit(c(t=0.3, r=0.055, b=0.3, l=0.01), "cm")  
    )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant