Learn R Programming

ggseg3d (version 2.0.0)

set_legend: Set legend visibility

Description

For htmlwidget output, toggles legend visibility. For rgl output, draws or removes the legend overlay.

Usage

set_legend(p, show = TRUE)

Value

The input object, modified

Arguments

p

A ggseg3d or ggsegray object

show

logical. Whether to show the legend (default: TRUE)

Examples

Run this code
if (FALSE) {
ggseg3d() |> set_legend(FALSE)
ggsegray(hemisphere = "left") |> set_legend()
}

Run the code above in your browser using DataLab