plot.etree {etree}R Documentation

Visualization of Energy Trees

Description

Returns the plot of an object of class "etree".

Usage

## S3 method for class 'etree'
plot(
  x,
  main = NULL,
  terminal_panel = NULL,
  tp_args = list(),
  inner_panel = node_inner,
  ip_args = list(),
  edge_panel = edge_simple,
  ep_args = list(),
  type = c("extended", "simple"),
  drop_terminal = NULL,
  tnex = NULL,
  newpage = TRUE,
  pop = TRUE,
  gp = gpar(),
  ...
)

Arguments

x

An object of class "etree", i.e., a fitted Energy Tree.

main

Optional title for the plot.

terminal_panel

Optional panel function of the form function(node) plotting the terminal nodes. Alternatively, a panel generating function of class "grapcon_generator" that is called with arguments x and tp_args to set up a panel function. By default, an appropriate panel function is chosen depending on the scale of the dependent variable.

tp_args

List of arguments passed to terminal_panel if this is a "grapcon_generator" object.

inner_panel

Optional panel function of the form function(node) plotting the inner nodes. Alternatively, a panel generating function of class "grapcon_generator" that is called with arguments x and ip_args to set up a panel function.

ip_args

List of arguments passed to inner_panel if this is a "grapcon_generator" object.

edge_panel

Optional panel function of the form function(split, ordered = FALSE, left = TRUE) plotting the edges. Alternatively, a panel generating function of class "grapcon_generator" that is called with arguments x and ep_args to set up a panel function.

ep_args

List of arguments passed to edge_panel if this is a "grapcon_generator" object.

type

Character specifying the complexity of the plot: extended tries to visualize the distribution of the response variable in each terminal node whereas simple only gives some summary information.

drop_terminal

Logical indicating whether all terminal nodes should be plotted at the bottom.

tnex

Numeric value giving the terminal node extension in relation to the inner nodes.

newpage

Logical indicating whether grid.newpage() should be called.

pop

Logical indicating whether the viewport tree should be popped before return.

gp

Graphical parameters.

...

Additional arguments.

Details

The plot() method for "etree" objects allows for the visualization of fitted Energy Trees, as returned by etree() or as contained in the ensemble element of a fitted Random Energy Forest.

Value

No return value, called for side effects (plotting the tree).


[Package etree version 0.1.0 Index]