l_layer_hide | R Documentation |
A hidden layer is not rendered. If a group layer is set to be hidden then all its descendants are not rendered either.
l_layer_hide(widget, layer)
widget |
widget path or layer object of class |
layer |
layer id. If the widget argument is of class |
Visibile layers are rendered, invisible ones are not. If any
ancestor of a layer is set to be invisible then the layer is not rendered
either. The layer visibility flag can be checked with
l_layer_isVisible
and the actual visibility (i.e. are all the
ancesters visibile too) can be checked with
l_layer_layerVisibility
.
Note that layer visibility is not a state of the layer itself, instead is information that is part of the layer collection (i.e. its parent widget).
0 if success otherwise the function throws an error
l_layer
, l_layer_show
,
l_layer_isVisible
, l_layer_layerVisibility
,
l_layer_groupVisibility
if(interactive()){
p <- l_plot()
l <- l_layer_rectangle(p, x=0:1, y=0:1, color="steelblue")
l_layer_hide(p, l)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.