Skip to content
Back to formatted view

Raw Message

Message-ID: <23579970.post@talk.nabble.com>
Date: 2009-05-17T03:39:23Z
From: Ben Bolker
Subject: How to turn the xyplot graphics upside-down?
In-Reply-To: <ecd417610905152127x5a78d1b7ped57f66739c8b5d1@mail.gmail.com>

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.