Hi:
The function to use is scale_y_reverse(), but it uses the 'actual' y
limits (i.e., those for which the scale is trained) rather than the
defined y limits. Here's a toy example:
DF <- data.frame(x = rnorm(50), y = rnorm(50, mean = 20, sd = 5))
library('ggplot2')
ggplot(DF, aes(x, y)) + geom_point() + scale_y_reverse()
However, if you try to set an explicit y range and then apply
scale_y_reverse(), it ignores the defined range:
(b <- ggplot(DF, aes(x, y)) + geom_point() + ylim(0, 50))
b + scale_y_reverse()
Perhaps someone can chime in with a way to use scale_y_reverse() on a
scale with a user-defined y-range.
Dennis
> --
> You received this message because you are subscribed to the ggplot2 mailing list.
> Please provide a reproducible example:
https://github.com/hadley/devtools/wiki/Reproducibility
>
> To post: email
ggp...@googlegroups.com
> To unsubscribe: email
ggplot2+u...@googlegroups.com
> More options:
http://groups.google.com/group/ggplot2