loon (version 1.3.3)

l_layer_line: Layer a line

Description

Loon's displays that are based on Cartesian coordinates (i.e. scatterplot, histogram and graph display) allow for layering visual information including polygons, text and rectangles.

Usage

l_layer_line(
  widget,
  x,
  y = NULL,
  color = "black",
  linewidth = 1,
  dash = "",
  label = "line",
  parent = "root",
  index = 0,
  ...
)

Arguments

widget

widget path name as a string

x

the coordinates of line. Alternatively, a single plotting structure, function or any R object with a plot method can be provided as x and y are passed on to xy.coords

y

the y coordinates of the line, optional if x is an appropriate structure.

color

color of line

linewidth

linewidth of outline

label

label used in the layers inspector

parent

group layer

index

of the newly added layer in its parent group

...

additional state initialization arguments, see l_info_states

Value

layer object handle, layer id

Details

For more information run: l_help("learn_R_layer")

See Also

l_layer, l_info_states

Examples

Run this code
# NOT RUN {
if(interactive()){

p <- l_plot()
l <- l_layer_line(p, x=c(1,2,3,4), y=c(1,3,2,4), color='red', linewidth=2)
l_scaleto_world(p)

# object
p <- l_plot()
l <- l_layer_line(p, x=nhtemp)
l_scaleto_layer(l)

}

# }

Run the code above in your browser using DataLab