l_layer_line | R Documentation |
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,
...
)
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 |
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
|
For more information run: l_help("learn_R_layer")
layer object handle, layer id
l_layer
, l_info_states
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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.