Make a bubble plot of a transition matrix
# S3 method for rate.matrix
plot(x, eq.freq = NULL, max.cex = 10,
eq.freq.max.cex = 5, alphabet = NULL, col = NULL, eq.freq.col = NULL,
filled = TRUE, add = FALSE, ...)
A square matrix representing a continuous-time markov model; rows should sum to zero, with negative values cross the diagonal
A numeric vector giving the equilibrium frequencies of each state. If provided, the equilibrium frequencies will be plotted along the bottom.
A scaling factor which determines the size of the largest circle
A scaling factor which determines the size of the largest circle in the equilibrium frequencies.
A character vector representing the state names for
each row/column of the matrix. Can either be a vector of size
nrow(m)
or a single character string with nrow(m)
characters. Can also be NULL
for no row/column labels.
If NULL
, all circles will be drawn in black.
Otherwise, col can be a matrix of the same dimension of m
,
each entry should indicate the color used for the corresponding
cell in the transition matrix.
(Only applicable when eq.freq provided). Should be vector of same length as eq.freq, though values will be recycled. Values in the vector indicate colors to draw the equilibrium frequency bubbles.
If TRUE
, plot filled circles.
If TRUE
, add to the existing plot. Otherwise create
a new plot.
Further arguments to be passed to plot
.