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.

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

dash

dash pattern of line, see https://www.tcl.tk/man/tcl8.6/TkCmd/canvas.htm#M26

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

Examples

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) }