Learn R Programming

x3ptools (version 0.0.2)

x3p_add_legend: Add legend to active rgl object

Description

Add the legend for colors and annotations to the actuve rgl window.

Usage

x3p_add_legend(x3p, colors = NULL)

Arguments

x3p

x3p object with a mask

colors

named character vector of colors (in hex format by default), names contain annotations

Examples

Run this code
# NOT RUN {
x3p <- read_x3p(system.file("sample-land.x3p", package="x3ptools"))
# }
# NOT RUN {
image_x3p(x3p) # run when rgl can open window on the device
x3p_add_legend(x3p) # add legend
# }

Run the code above in your browser using DataLab