add_legend {scplot} | R Documentation |
Add a legend to an scplot
Description
Add a legend to an scplot
Usage
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
)
Arguments
object |
An scplot object (class |
labels |
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")). |
section_labels |
A character vector of length two. The labels for the lines section and phase section. |
case |
Numerical vector with the case number or character string. |
position |
The position ("none", "left", "right", "bottom", "top", or two-element numeric vector) |
datalines |
If TRUE, a legend for the datalines is generated. |
statlines |
If TRUE, a legend for the statlines is generated. |
phases |
If TRUE, a legend for the phases is generated. |
title |
A list with text style parameters for the title. |
text |
List with text parameters ( |
background |
A list with background styling arguments (fill, color, size, linetype). |
Value
An object of class scplot
(seescplot()
) with changed element
legend
.