Re: [R] How to reverse the sequence of axis Y ??

From: Kristel Joossens <kristel.joossens_at_econ.kuleuven.be>
Date: Sun 18 Dec 2005 - 04:04:13 EST

Hello Klebyn,

It might be that a better solution exists, but here is something that might help you. (I used that all y's are positive!)

R> maxy=ceiling(max(y))
R> plot(x,maxy-y,axes=FALSE)
R> axis(1)
R> axis(2,0:maxy,seq(maxy,0,-1))

If not all your y's are positive define `miny' and take then R> axis(2,miny:maxy,seq(maxy,miny,-1))

Best regards and good luck,
Kristel

klebyn wrote:
>
>
> Hello R-users!
>
> My (simple?) doubt: How to reverse the sequence of axis Y ??
>
> the diagram below illustrate my idea...
>
> (default)
> |
> |
> . |
> . |
> . |
> 3 |
> 2 |
> 1 |
> 0 +----------------------------
> 0 1 2 3 ...
>
>
>
> like I want...
>
> 0 |
> 1 |
> 2 |
> 3 |
> . |
> . |
> . |
> |
> +----------------------------
> 0 1 2 3 ...
>
>
> thanks in advance
>
>
> klebyn
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

-- 
__________________________________________
Kristel Joossens        Ph.D. Student
Research Center ORSTAT  K.U. Leuven
Naamsestraat 69         Tel: +32 16 326929
3000 Leuven, Belgium    Fax: +32 16 326732
E-mail:  Kristel.Joossens@econ.kuleuven.be
http://www.econ.kuleuven.be/public/ndbae49

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Sun Dec 18 04:28:17 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:41:39 EST