scale_power | R Documentation |
Creates a continuous power scale, where input values are transformed with power_trans(exponent) before calculating the output.
Power scales can be useful in transforming positively skewed data. A square-root or cube-root scale can be helpful in dealing with right-skewed data.
A square-root scale can be defined with scale_power(exponent = 0.5, ...)
(the default). A
square-root scale is a good choice for scaling the radius of point data, as this would result
in a linear scale for the area
of each point.
scale_color_power(
col,
palette = scales::viridis_pal(),
na_color = "#000000",
exponent = 0.5,
limits = NULL,
breaks = NULL,
n_ticks = 6,
tick_format = format_number,
col_label = "{.col}",
legend = TRUE
)
scale_power(
col,
range = 0:1,
na_value = 0,
exponent = 0.5,
limits = NULL,
breaks = NULL,
col_label = "{.col}",
legend = TRUE
)
col |
< |
palette |
<
A |
na_color |
< |
exponent |
< |
limits |
< |
breaks |
< If not
Defaults to |
n_ticks |
< |
tick_format |
< |
col_label |
<
|
legend |
< |
range |
< |
na_value |
< |
Other scales:
rescale_center()
,
rescale_diverge()
,
scale_category()
,
scale_identity()
,
scale_linear()
,
scale_log()
,
scale_quantile()
,
scale_quantize()
,
scale_symlog()
,
scale_threshold()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.