Replies: 1 comment 8 replies
-
This is the way. I'm not a fan of EDIT: extragrammatical? as in outside the grammar? |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Sometimes there's discussion about starting bar charts at zero. Another logical limit could be the max hypothetical count - so y axis starts at 0 and ends a the number of observations. A common upper limit can be nice in ensembles so that bar lengths are comparable across plots.
I think the standard way to do this would be to enter limits = c(0, nrow(data)) manually in scale_y_continuous() for vertical bar chart for example. Another way could be to define a layer geom_bar_maxlimit created with GeomBlank and a Stat that has the data$y <- nrow(data)... Other ways?
Beta Was this translation helpful? Give feedback.
All reactions