I'm making a grouped bar chart with ggplot2. I have this code...
ggplot(data = dummy,
aes(
fill = Geography2,
x = Group,
y = PunishmentRate
)
) +
geom_bar(
position = "dodge",
stat = "identity",
width = 0.5,
binwidth = 0
) +
coord_flip() +
geom_text(data = subset(dummy, Group == "White"),
aes(
label = Geography2,
y = 0
),
position = position_dodge(0.5),
hjust = 0
)
That makes this chart...
I thought adding binwidth
parameter in geom_bar()
would bring the groups closer together, but it did not. How do I bring the groups closer together?