palette_size_range | R Documentation |
Symbol Size Mapping
palette_size_range(range = c(1, 6), ...)
range |
A length-two |
... |
Currently not used. |
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.
Other palettes:
palette_color_continuous()
,
palette_color_discrete()
,
palette_color_picker()
,
palette_shape()
## 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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.