# NOT RUN {
ggplot(reorder_by(cyl, ~-cyl , mtcars, length), aes(x=as.factor(cyl))) +
geom_bar() +
theme_apa() +
y0(cushion(as.factor(mtcars$cyl))) +
xlab("Cylinders") +
ylab("Total") + qgrid()
ggplot(reorder_by(cyl, ~-cyl , mtcars, length), aes(x=as.factor(cyl))) +
geom_bar() +
theme_apa() +
y0(cushion(as.factor(mtcars$cyl))) +
xlab("Cylinders") +
ylab("Total") + qgrid(x=NULL)
ggplot(reorder_by(cyl, ~-cyl , mtcars, length), aes(x=as.factor(cyl))) +
geom_bar() +
theme_apa() +
y0(cushion(as.factor(mtcars$cyl))) +
xlab("Cylinders") +
ylab("Total") + qgrid(x=NULL, y="red")
# }
Run the code above in your browser using DataLab