Plots a color legend for a distance or cost matrix for multi-panel plots or external image editors.
Arguments
- m
(required, numeric matrix) distance or cost matrix generated by
psi_distance_matrix()
orpsi_cost_matrix()
, but any numeric matrix will work. Default: NULL- color
(optional, character vector) vector of colors. Default: NULL
- breaks
(optional, numeric vector) vector of breaks for the color guide. Default: NULL
- title
(optional, character string) guide title. Default: NULL
- text_cex
(optional, numeric) multiplier for the text size. Default: 1
See also
Other internal_plotting:
utils_color_breaks()
,
utils_color_continuous_default()
,
utils_color_discrete_default()
,
utils_line_color()
,
utils_line_guide()
,
utils_matrix_plot()
Examples
#prepare time series list
tsl <- tsl_simulate(
n = 2,
independent = TRUE
)
#> distantia::zoo_name_set(): renaming zoo time series from 'A' to 'B'.
#distance matrix between time series
dm <- psi_distance_matrix(
x = tsl[[1]],
y = tsl[[2]]
)
if(interactive()){
utils_matrix_guide(m = dm)
}