How to turn the xyplot graphics upside-down?
lau kue wrote:
Hi everyone, I'm learning to use R. The below script works well, but i want to turn the y-axis and the graphics upside-down, how should i do? Appreciate if any tips!
Your example isn't reproducible (i.e. we don't have the data), so can't be sure, but try giving an explicit "ylim" argument with low and high limits reversed. For example:
d <- data.frame(x=runif(100),y=runif(100)) xyplot(y~x,data=d) xyplot(y~x,data=d,ylim=c(1,0))
or perhaps
xyplot(y~x,data=d,ylim=rev(range(d$y)))
View this message in context: http://www.nabble.com/How-to-turn-the-xyplot-graphics-upside-down--tp23571346p23579970.html Sent from the R help mailing list archive at Nabble.com.