set_dataline: Set data lines of an scplot

View source: R/set_dataline.R

set_datalineR Documentation

Set data lines of an scplot

Description

Either set aesthetics of the default data line or add another data line.

Usage

set_dataline(
  object,
  variable = NULL,
  line,
  point,
  type = "continuous",
  label = NULL,
  ...
)

add_dataline(...)

Arguments

object

An scplot object (class scplot) returned from the scplot() function.

variable

String. The name of a new variable for adding a new line. If left empty, the aesthetics of the default data line are changed.

line

List with line parameters (⁠"colour", "linewidth", "linetype", "lineend", "arrow"⁠). See element_line().

point

A list with point parameters (⁠"colour", "size", "shape"⁠). See element_point().

type

Either "continuous" or "discrete"

label

A character string which is used to set the label in a legend.

...

As a shortcut, arguments passed hear are bundled as line arguments (see element_line()).

Value

An object of class scplot (seescplot()) with a changed datalines element.

See Also

element_line(), element_point()

Examples

data(exampleAB_add, package = "scan")
scplot(exampleAB_add)  |>
  set_dataline("depression", color = "darkblue")

jazznbass/scplot documentation built on April 17, 2025, 3:05 p.m.