palette_size_range: Symbol Size Mapping

View source: R/palettes.R

palette_size_rangeR Documentation

Symbol Size Mapping

Description

Symbol Size Mapping

Usage

palette_size_range(range = c(1, 6), ...)

Arguments

range

A length-two numeric vector giving range of possible sizes (greater than 0).

...

Currently not used.

Value

A palette function that when called with a single argument (a numeric vector of continuous values) returns a numeric vector giving the amount by which plotting text and symbols should be magnified relative to the default.

See Also

Other palettes: palette_color_continuous(), palette_color_discrete(), palette_color_picker(), palette_shape()

Examples

## Visualize a simple DEM model
## Distribution of elevation values
elevation <- hist(volcano)

## Where are breaks?
elevation$breaks

## Build palette functions
BuRd <- color("BuRd")
ramp_BuRd <- palette_color_continuous(colors = BuRd(10))

## Plot image
image(volcano, col = ramp_BuRd(elevation$breaks))
legend("topright", legend = elevation$breaks, fill = ramp_BuRd(elevation$breaks))

khroma documentation built on Sept. 11, 2024, 5:26 p.m.