Plot an interactive MTG
# S3 method for mtg plotly_mtg(mtg, ..., .scale = NULL, .angle = 45, .phylotaxy = TRUE) # S3 method for Node plotly_mtg(mtg, ..., .scale = NULL, .angle = 45, .phylotaxy = TRUE) plotly_mtg(mtg, ..., .scale = NULL, .angle = 45, .phylotaxy = TRUE)
mtg | An MTG, as from |
---|---|
... | Names of the variables to be added to the tooltip (see details and examples). |
.scale | The scale required for plotting |
.angle | Insertion angle when branching |
.phylotaxy | Is phylotaxy required ? Uses 180 degrees if |
A plotly object of the MTG
The name of each argument in ...
will be the name of a the variable given in the tooltip,
and the value will be the value of the corresponding variable given as value. The arguments in ...
are
automatically quoted and evaluated in the context of the mtg
. They support unquoting and splicing. See
the chapter about metaprogramming in the book "Advanced R"
from H. Wickham for an introduction to these concepts.
mutate_mtg()
to compute variables and add it to the tooltip with ...
.
#> Warning: the condition has length > 1 and only the first element will be used#> Warning: the condition has length > 1 and only the first element will be used#> Warning: the condition has length > 1 and only the first element will be used#> Warning: the condition has length > 1 and only the first element will be usedplotly_mtg(MTG) # We can add more information to the tooltip, e.g. the values of the Length column: plotly_mtg(MTG, Length) # We can also use custom names for the variable in the tooltip: plotly_mtg(MTG, node_width = Width) # Here the tooltip will show the Width, labeled as "node_width"