I don't know if this is possible using geom_col()
, but I'm wondering if it is possible to change the widths of the dodged bars in the below plot. For example, I would like to set the width of all t3 bars to double the width of t1 and t2 bars
library(ggplot2)
library(tibble)
df <- tribble(
~loc, ~time, ~value,
"a", "t1", 4,
"a", "t2", 6,
"a", "t3", 7,
"b", "t1", 2,
"b", "t2", 4,
"b", "t3", 8,
"c", "t1", 6,
"c", "t2", 4,
"c", "t3", 2
)
df %>%
ggplot(aes(x = loc, y = value, fill = time)) +
geom_col(position = "dodge")
Created on 2020-05-26 by the reprex package (v0.3.0)