liamrevell / phytools

GNU General Public License v3.0
207 stars 56 forks source link

Font size for the colour bar in plotBranchbyTrait #60

Closed ChrisHIV closed 4 years ago

ChrisHIV commented 4 years ago

add.color.bar checks whether it has an argument fsize, and if so, uses it to scale the font of the color bar. But plotBranchbyTrait, which calls add.color.bar, is hardcoded to not pass it an fsize value. I think that could be addressed e.g. by duplicating the lines

    if(hasArg(fsize)) fsize<-list(...)$fsize
    else fsize<-1.0

from the scope of add.color.bar into the scope of plotBranchbyTrait too, and then passing fsize as an argument to the call of add.color.bar. Thanks for the great tool!

liamrevell commented 4 years ago

I just addressed this by letter cex be a numeric vector in which the first element is the tip label font size and the second element is the legend font size.