Description Usage Arguments Examples
This function creates a plot of the decision tree with customizable appearance.
1 2 3 4 5 |
tree |
a decision tree/tree object generated by create_tree() |
edge.label.display |
edge label mode, options: - "all","both": concatenate edge names and probabilities (default) - "label": show edge names only - "probability": show edge probabilities only - "none": don't show edge labels |
vertex.label.display |
vertex label mode, options: - "all": show labels for all vertices - "end": show labels only for end vertices (default) - "none": don't show vertex labels |
edge.label.position |
how far along the edge's straight part to display the label ([0-1], default = 0.33) |
vertex.size |
size of vertices in mm (default = 7) |
font.size |
font size in edge and vertex labels (default = 3) |
plot.padding |
left and right padding to add to the plot, options: - "auto": automatically set based on font size and max label length (default) - c(left, right): manually set based on provided vector |
color.root |
color of the root node (default = "yellow") |
color.internal |
color of internal, i.e. not root or end nodes (default = "green") |
color.end |
color of the end nodes (default = "red") |
theme |
theme to apply to the final plot (default = empty) refer to https://ggplot2.tidyverse.org/reference/theme.html for more on ggplot2 themes |
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.