KlausVigo / phangorn

Phylogenetic analysis in R
http://klausvigo.github.io/phangorn/
203 stars 38 forks source link

densiTree does not show title #90

Closed richelbilderbeek closed 4 years ago

richelbilderbeek commented 5 years ago

Hi Klaus,

When I create an ordinary plot, using plot, adding a title is easy:

plot(1:10, main = "my_title")

title_around

To add a title to a phangorn::densiTree function, I read in the doc:

... further arguments to be passed to plot.

I deduce I should use main as an argument to get a title, as this is the same as in plot.

When I do that:

phangorn::densiTree(c(ape::rcoal(n = 10)), main = "my_title")

I get a densiTree without a title:

title_missing

I wonder if either

Full script is below, looking forward to your response :+1:

Full script

png("~/title_around.png")
plot(1:10, main = "my_title")
dev.off()

png("~/title_missing.png")
phangorn::densiTree(c(ape::rcoal(n = 10)), main = "my_title")
dev.off()
KlausVigo commented 4 years ago

@richelbilderbeek, Thanks for spotting this. Should work now. Klaus