[Rd] problem with plot(...., xlim=c(5,0)) (PR#480)

Rashid Nassar rnassar@duke.edu
Wed, 15 Mar 2000 10:44:23 -0500 (EST)


Dear Sirs,

Thank you very much for your replies.  If I may, and assuming this makes
sense, I would like to suggest as a low-priority wish-list item for a
future version that perhaps the plot function could take an additional
optional argument (e.g. reverse, which can have values "x", "y" or "xy")
which would make the plot function do the calculations suggested by Dr
Dalgaard below to allow easy plotting with reversed axis values, and even
prehaps issue a warning message for xlim=c(5:2) to make it clear that this
is not supposed to work that way?  Just some thoughts. 

Thank you again!

Rashid Nassar


On 13 Mar 2000, Peter Dalgaard BSA wrote:

> Date: 13 Mar 2000 14:23:53 +0100
> From: Peter Dalgaard BSA <p.dalgaard@biostat.ku.dk>
> To: Martin Maechler <maechler@stat.math.ethz.ch>
> Cc: Prof Brian Ripley <ripley@stats.ox.ac.uk>, r-devel@stat.math.ethz.ch,
>     rnassar@duke.edu, R-bugs@biostat.ku.dk
> Subject: Re: [Rd] problem with plot(...., xlim=c(5,0)) (PR#480)
> 
> Martin Maechler <maechler@stat.math.ethz.ch> writes:
> 
> > >>>>> "BDR" == Prof Brian Ripley <ripley@stats.ox.ac.uk> writes:
> 
> >     >> plot(1:4,1:4,xlim=c(5,0),ylim=c(5,0))
> >     >> 
> >     >> shows axis labels as:
> >     >> 
> >     >> |    |    |    |    |     |
> >     >> 0
> >     >> rather than
> >     >> |    |    |    |    |    |
> >     >> 5    4    3    2    1    0
> >     >> 
> >     >> as I believe it used to do in some earlier version.
> > 
> >     BDR> Up to 0.64.2, not since 0.65.0.
> > 
> > No, unfortunately,  happens here with 1.0.0 (even patched; "R-release")
> > 
> 
> I think Brian meant that it hasn't done the  5 4 3 2 1 thing since
> 0.64.2...  
> 
> In general, it can be argued that the reversed xy limits are not safe
> and shouldn't be, since things are likely not to work at the device
> level with a mirrored coordinate system (I.e.: if we decide that it
> should work, we may find ourselves fixing lots of small glitches in
> devxxx.c). 
> 
> Plotting (5-x,5-y) and doing the axes with axis(n, at=0:5, labels=5:0)
> will get the plot done in a cleaner, albeit more cumbersome fashion.
> 
> -- 
>    O__  ---- Peter Dalgaard             Blegdamsvej 3  
>   c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
>  (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
> ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
> 
> 

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._