l_layer_rectangles.Rd
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_rectangles(widget, x, y, color = "gray80", linecolor = "black", linewidth = 1, label = "rectangles", parent = "root", index = 0, ...)
widget | widget path name as a string |
---|---|
x | list with vectors with x coordinates |
y | list with vectors with y coordinates |
color | vector with fill colors, if empty string |
linecolor | vector with outline colors |
linewidth | vector with line widths |
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
|
layer object handle, layer id
For more information run: l_help("learn_R_layer")
p <- l_plot() l <- l_layer_rectangles( p, x = list(c(0,1), c(1,2), c(2,3), c(5,6)), y = list(c(0,1), c(1,2), c(0,1), c(3,4)), color = c('red', 'blue', 'green', 'orange'), linecolor = "black" ) l_scaleto_world(p) l_info_states(l)#> $x #> $x$type #> [1] "nested_double" #> #> $x$dimension #> [1] "n" #> #> $x$defaultvalue #> [1] "" #> #> $x$description #> [1] "x coordinates" #> #> #> $y #> $y$type #> [1] "nested_double" #> #> $y$dimension #> [1] "n" #> #> $y$defaultvalue #> [1] "" #> #> $y$description #> [1] "y coordinates" #> #> #> $tag #> $tag$type #> [1] "string" #> #> $tag$dimension #> [1] "n" #> #> $tag$defaultvalue #> [1] "" #> #> $tag$description #> [1] "tags useful for item bindings" #> #> #> $active #> $active$type #> [1] "boolean" #> #> $active$dimension #> [1] "n" #> #> $active$defaultvalue #> [1] "TRUE" #> #> $active$description #> [1] "if TRUE visual is rendered, otherwise it is not" #> #> #> $itemLabel #> $itemLabel$type #> [1] "string" #> #> $itemLabel$dimension #> [1] "n" #> #> $itemLabel$defaultvalue #> [1] "" #> #> $itemLabel$description #> [1] "?" #> #> #> $color #> $color$type #> [1] "colorOrTransparent" #> #> $color$dimension #> [1] "n" #> #> $color$defaultvalue #> [1] "black" #> #> $color$description #> [1] "fill color of rectangles" #> #> #> $linecolor #> $linecolor$type #> [1] "colorOrTransparent" #> #> $linecolor$dimension #> [1] "n" #> #> $linecolor$defaultvalue #> [1] "" #> #> $linecolor$description #> [1] "outline colors of rectangles" #> #> #> $linewidth #> $linewidth$type #> [1] "positive_double" #> #> $linewidth$dimension #> [1] "n" #> #> $linewidth$defaultvalue #> [1] "1" #> #> $linewidth$description #> [1] "linewidths of outlines" #> #>