I am getting error when trying to use the preserve argument to position_dodge() described here in the ggplot documentation.
ggplot(
mtcars,
aes(
factor(cyl),
fill = factor(vs)
)
) +
geom_bar(position = position_dodge(preserve = "single"))
Error in position_dodge(preserve = "single") : unused argument (preserve = "single")
I am using R version 3.4.1 and ggplot2 version 2.2.1
Any suggestions? Thanks
preserve
is not an argument toposition_dodge
. Try?position_dodge
and you will see that the only argument iswidth
– Mike H.