For htmlwidget output, toggles legend visibility. For rgl output,
draws or removes the legend overlay.
Usage
set_legend(p, show = TRUE)
Arguments
- p
A ggseg3d or ggsegray object
- show
logical. Whether to show the legend (default: TRUE)
Value
The input object, modified
Examples
ggseg3d() |> set_legend(FALSE)
if (FALSE) { # \dontrun{
# rgl requires OpenGL; not run in check environments.
ggsegray(hemisphere = "left") |> set_legend()
} # }