Applies the selected palette as the color aesthetic when geom_sf
is used and the bi_class
variable is given as the color
in the aesthetic
mapping.
bi_scale_color(pal, dim = 3, flip_axes = FALSE, rotate_pal = FALSE, ...)
A palette name or a vector containing a custom palette. See
the help file for bi_pal
for complete list of built-in palette
names. If you are providing a custom palette, it must follow the formatting
described in the 'Advanced Options' vignette.
The dimensions of the palette. To use the built-in palettes,
this value must be either 2
, 3
, or 4
. A value of
3
, for example, would be used to create a three-by-three bivariate
map with a total of 9 classes.
If you are using a custom palette, this value may be larger (though these
maps can be very hard to interpret). See the 'Advanced Options' vignette
for details on the relationship between dim
values and palette size.
A logical scalar; if TRUE
the axes of the palette
will be flipped. If FALSE
(default), the palette will be displayed
on its original axes. Custom palettes with 'dim' greater
than 4 cannot take advantage of flipping axes.
A logical scalar; if TRUE
the palette will be
rotated 180 degrees. If FALSE
(default), the palette will be
displayed in its original orientation. Custom palettes with 'dim' greater
than 4 cannot take advantage of palette rotation.
Arguments to pass to scale_color_manual
A ggplot
object with the given bivariate palette applied to the data.
bi_pal