Guide for Time Series Plots
Usage
utils_line_guide(
x,
position = "topright",
color = NULL,
width = 1,
length = 1,
text_cex = 0.7,
ncol = 1,
subpanel = FALSE
)
Arguments
- x
(required, sequence) a zoo time series or a time series list. Default: NULL
- position
(optional, vector of xy coordinates or character string). This is a condensed version of the
x
andy
arguments of thegraphics::legend()
function. Coordinates (in the range 0 1) or keyword to position the legend. Accepted keywords are: "bottomright", "bottom", "bottomleft", "left", "topleft", "top", "topright", "right" and "center". Default: "topright".- color
(optional, character vector) vector of colors for the time series columns. If NULL, uses the palette "Zissou 1" provided by the function
grDevices::hcl.colors()
. Default: NULL- width
(optional, numeric vector) Widths of the time series lines. Default: 1
- length
(optional, numeric) maps to the argument
seg.len
ofgraphics::legend()
. Length of the lines drawn in the legend. Default: 1- text_cex
(optional, numeric) Multiplier of the text size. Default: 0.7
- ncol
(optional, integer) Number of columns in which to set the legend items. Default: 1.
- subpanel
(optional, logical) internal argument used when generating the multipanel plot produced by
distantia_plot()
.
See also
Other internal_plotting:
utils_color_breaks()
,
utils_color_continuous_default()
,
utils_color_discrete_default()
,
utils_line_color()
,
utils_matrix_guide()
,
utils_matrix_plot()
Examples
x <- zoo_simulate()
if(interactive()){
zoo_plot(x, guide = FALSE)
utils_line_guide(
x = x,
position = "right"
)
}