new_continuous_legend: New continuous legend

View source: R/class_ContinuousLegend.R

new_continuous_legendR Documentation

New continuous legend

Description

Create a new ContinuousLegend object.

Usage

new_continuous_legend(min_value, max_value, colors, n = 4)

Arguments

min_value

numeric Minimum value to show in the legend.

max_value

numeric Maximum value to show in the legend.

colors

character Colors to show in the color the legend. These colors should be in hex format (e.g. "#AABBCC") and are used to generate the color bar.

n

integer Number of labels to display in the color bar. Default to 4.

Value

A ContinuousLegend object.

Examples

# create new object
l <- new_continuous_legend(0, 1, c("#000000", "#DDDDDD"))

# print object
print(l)

NCC-CNC/wheretowork documentation built on Feb. 27, 2025, 6:11 p.m.