Construct a style specification for an annot_layer.
Usage
at_style(
colour = NULL,
fill_alpha = 0.3,
stroke_width = 2,
visible = TRUE,
locked = FALSE,
z = 1L,
call = rlang::caller_env()
)Arguments
- colour
Either
NULL(default; the Okabe-Ito colourblind-safe palette is cycled over the layer's labels), a single colour recycled across labels, or a named character vector mapping labels to colours. The style is stored with the resolved mapping so colours are stable across sessions.- fill_alpha
Fill opacity in
[0, 1]. Default0.3.- stroke_width
Stroke width in pixels. Default
2.- visible
Logical; whether the layer is drawn. Default
TRUE.- locked
Logical; whether the layer is protected from edits. Default
FALSE.- z
Integer draw order (higher is drawn later, on top). Affects mask overlap resolution. Default
1.- call
The calling environment, for error reporting.
See also
Other layers:
at_layer(),
at_layer_add(),
at_layer_n(),
at_layer_remove(),
at_layer_rois()