Skip to contents

Draws each rate matrix as the ellipse of the changes of two traits per unit time (one standard deviation by default), one ellipse per regime. The shape shows the evolutionary correlation, the size the rates: proportional matrices give nested ellipses of the same shape, shared eigenvectors give ellipses with the same axes, equal variances give ellipses inscribed in the same box.

Usage

# S3 method for class 'rate_matrix'
plot(
  x,
  traits = c(1, 2),
  level = 1,
  colours = NULL,
  legend = TRUE,
  linewidth = 0.9,
  ...
)

Arguments

x

A rate_matrix object from rate_matrix().

traits

The two traits to draw (names or numbers); with more traits, the ellipse is that of the marginal covariance of the two.

level

Number of standard deviations of the ellipse.

colours

Colours of the regimes, in the order of the regimes.

legend

Draw the legend of the regimes?

linewidth

Width of the ellipses.

...

Not used.

Value

A ggplot object.

Examples

r <- rate_matrix(c(1, 2), correlation = 0.6, constraint = "shared",
                 eigenvalues = list(slow = c(1, 0.2), fast = c(1, 2)))
plot(r)