plot.lslin {loadshaper}R Documentation

Plot Linear Load Shape

Description

Plot method of lslin object

Usage

## S3 method for class 'lslin'
plot(
  x,
  case = 1,
  col = c(1, 2),
  scatter = FALSE,
  legend = TRUE,
  leg_pos = "topright",
  ... = NULL
)

Arguments

x

An object of class lslin, created by lslin function.

case

A numeric value from {1, 2, 3} to select the type of plot. See "Details".

col

Color of the plots. Can be numeric or text or mixed as in col. For length(col) < 2, a default second color is used.

scatter

Logical. Scatter plot if TRUE, line plot if FALSE.

legend

Logical indicating if legend to be displayed.

leg_pos

A text value for position/location of the legend. Default is topright. See legend for full list of keywords.

...

NULL. Used for S3 generic/method consistency.

Details

If scatter = FALSE then per unit load duration curve for case = 1, per unit load for case = 2, actual load (in original unit) for case = 3. If scatter = TRUE then per unit scatter plot for case = 1 or 2, actual load scatter plot for case = 3.

Value

NULL.

Examples

loads <- ercot[ercot$Year == 2019, ]$COAST
linear_loadshape <- lslin(loads, target_lf = 0.5)
# --------------
plot(linear_loadshape, col = c(2, 4))
plot(linear_loadshape, case = 2, col = c(2, 4))
plot(linear_loadshape, case = 3,
     col = c("salmon", "deepskyblue"),
     leg_pos = "topleft")





[Package loadshaper version 1.1.1 Index]