l_layer_rectangle | 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_rectangle(
widget,
x,
y,
color = "gray80",
linecolor = "black",
linewidth = 1,
label = "rectangle",
parent = "root",
index = 0,
...
)
widget |
widget path name as a string |
x |
x coordinates |
y |
y coordinates |
color |
fill color, if empty string |
linecolor |
outline color |
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
|
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_rectangle(p, x=c(2,3), y=c(1,10), color='steelblue')
l_scaleto_layer(l)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.