Skip to contents

Custom wrapper for geom_bar

Usage

geom_bar_RR(..., width = 0.6)

Arguments

...

Other arguments passed on to layer(). These are often aesthetics, used to set an aesthetic to a fixed value, like colour = "red" or size = 3. They may also be parameters to the paired geom/stat.

width

Bar width. By default, set to 90% of the resolution() of the data.

Examples

library(ggplot2)
mtcars |>
ggplot(aes(x = factor(cyl),
fill = factor(am))) +
theme_RR() +
geom_bar_RR() +
labs(title = "Number of Cars per Number of Cylinders",
x = "Number of Cylinders",
y = "Count") +
scale_fill_RR()