plot.vistla | R Documentation |
Plots a vistla tree, using layout derived by a Buchheim et al. extension of the standard Reingold-Tilford method. The tree root is placed on the left, while the paths extend to the right, with all branches of the same depth at the same horizontal coordinate. The path are sorted vertically, from strongest on top to weakest on the bottom. Link weight indicates, by default, the link's score. A feature name in parentheses indicates that is is only a way-point in a path to some other feature.
## S3 method for class 'vistla'
plot(
x,
...,
slant,
circular,
asp1 = FALSE,
pmar = c(0.05, 0.05, 0.05, 0.05),
edge_col = 1,
edge_lwd = "scale",
edge_lty = 1,
label_text = function(x) x$name,
label_border_col = 1,
label_border_lty = function(x) ifelse(x$leaf, 1, 2),
label_fill = "white"
)
## S3 method for class 'vistla_plot'
plot(x, ...)
## S3 method for class 'vistla_plot'
print(x, ...)
x |
vistla, vistla hierarchy or vistla plot object. |
... |
ignored. |
slant |
arrange vertices in a slanted way.
Can be given as a number, possibly negative, indicating the amount of slant, or as |
circular |
if given |
asp1 |
if |
pmar |
Specifies margins as a fraction of graph size; expects a 4-element vector, in standard R bottom-left-top-right order. |
edge_col |
edge colour; can be given as vector, then mapping order adheres to the one in hierarchy object; please note that the edge towards first feature, the root, is not drawn, so the first element is effectively ignored. If given as a function, it is called on the internally generated extended hierarchy object, and the result is used as an aesthetic. |
edge_lwd |
edge width; behaves similarly to |
edge_lty |
edge line-type; behaves similarly to |
label_text |
vertex label text, feature name by default.
Behaves similarly to |
label_border_col |
vertex label border colour; behaves similarly to |
label_border_lty |
vertex label border line-type; behaves similarly to |
label_fill |
vertex label fill colour; behaves similarly to |
Grid object with the graph.
The graph is rendered using the grid graphics system, in a manner similar to ggplot2
; the output of the plot.vistla
function is only a grid graphical object, while the actual plotting is done when this object is printed or plotted.
Yet, said object can be used with other functions in the grid ecosystem for rendering into files, being edited, combined with other plots, etc.
"Drawing rooted trees in linear time" C. Buchheim, M. Jünger, S. Leipert. Software: Practice and Experience 36(6):651-665 (2006).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.