scale_identity | R Documentation |
Creates an identity scale; a special case of a linear scale, where input is mapped to itself (input limits = output range). An identity scale is useful in cases where input data is already expressed in a visual representation (e.g. a line width) and should be used as-is.
scale_identity(col, na_value = 0, col_label = "{.col}", legend = TRUE)
col |
< |
na_value |
< |
col_label |
<
|
legend |
< |
Identity scales are almost equivalent to an accessor
to a numeric column;
differences are:
NA
is replaced with na_value
May render a numeric legend
Other scales:
rescale_center()
,
rescale_diverge()
,
scale_category()
,
scale_linear()
,
scale_log()
,
scale_power()
,
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.