
MNB Divergent Binned Fill Scale for ggplot2
scale_fill_mnb_divergent_b.Rd
This function creates a binned fill scale using the MNB (Magyar Nemzeti Bank) divergent color palette for ggplot2.
Usage
scale_fill_mnb_divergent_b(
n.breaks = NULL,
breaks = waiver(),
rev = FALSE,
...
)
Arguments
- n.breaks
Optional. Number of breaks for the binned scale. If NULL, the number of breaks is determined by the
breaks
parameter.- breaks
Optional. A vector of break points for the binned scale. Default is waiver(), which lets ggplot2 determine the breaks.
- rev
Logical. If TRUE, reverses the order of the colors. Default is FALSE.
- ...
Additional arguments passed to ggplot2::binned_scale().
Examples
library(ggplot2)
ggplot(iris, aes(Sepal.Length, Sepal.Width, fill = Petal.Length)) +
geom_point(shape = 21) +
scale_fill_mnb_divergent_b(n.breaks = 5, rev = TRUE)