| scale_quantile | R Documentation |
Creates a threshold scale, where threshold breaks are computed from the given quantile
probs.
Quantile scale legend ticks will be quantile values at each quantile break (including
limits), not the quantile probabilities at each break. This can be overridden in
tick_format.
Example:
tick_format = function(x) as.character(probs).
scale_color_quantile(
col,
palette = scales::viridis_pal(),
na_color = "#000000",
probs = seq.int(0, 1, 0.25),
data = NULL,
tick_format = format_number,
col_label = "{.col}",
legend = TRUE
)
scale_quantile(
col,
range = 0:1,
na_value = 0,
probs = seq.int(0, 1, 0.25),
data = NULL,
col_label = "{.col}",
legend = TRUE
)
col |
< |
palette |
<
A |
na_color |
< |
probs |
< |
data |
< |
tick_format |
< |
col_label |
<
|
legend |
< |
range |
< |
na_value |
< |
As the quantiles are computed from input data, quantile scales are incompatible with
layers that load data from a url (e.g mvt_layer). If quantiles for remote data are
known, a quantile scale can be constructed manually with scale_threshold().
Other scales:
rescale_center(),
rescale_diverge(),
scale_category(),
scale_identity(),
scale_linear(),
scale_log(),
scale_power(),
scale_quantize(),
scale_symlog(),
scale_threshold()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.