KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
As far as I can tell facet_wrap fills by row. In the same way you can specify how to fill a matrix with byrow I was hoping you could do the same with facet_wrap. I know I could reorder the levels of a factor to plot in this maner but this seems like a bit of work if there's a shorter method that I'm overlooking. library(ggplot2) ggplot(mtcars, aes(x=gear, y=mpg, fill=vs)) + geom_bar(position="dodge", stat="identity") + facet_wrap(~ carb, ncol=2) #fills by row How can we fill by column?
Tags (comma-separated)
Save Edits
Cancel