add_legend.Rd
Add a legend to an scplot
add_legend(
object,
labels = NULL,
section_labels = c("Lines", "Phases"),
case = 1,
position = "right",
datalines = TRUE,
statlines = TRUE,
phases = TRUE,
title = NULL,
text = NULL,
background = NULL
)
An scplot object (class scplot
) returned from the scplot()
function.
A character vector. Replaces the automatically build labels. When a vector element is NA, the corresponding element will not be replaced (e.g. c(NA, "Variable 2", NA, "Variable 4")).
A character vector of length two. The labels for the lines section and phase section.
Numerical vector with the case number or character string. case = "all"
for all cases.
The position ("none", "left", "right", "bottom", "top", or two-element numeric vector)
If TRUE, a legend for the datalines is generated.
If TRUE, a legend for the statlines is generated.
If TRUE, a legend for the phases is generated.
A list with text style parameters for the title.
List with text parameters ("family", "face", "colour", "size", "hjust", "vjust", "angle", "lineheight", "margin"
). See element_text()
.
A list with background styling arguments (fill, color, size, linetype).
An object of class scplot
(seescplot()
) with changed element
legend
.