Re: [R] Reversing axis in a log plot

From: Petr Pikal <petr.pikal_at_precheza.cz>
Date: Fri 20 May 2005 - 16:33:45 EST


Hi Christian

I did not see any response to your question yet, and my will not be very helpful. The error message comes from axis building, plot itself seems to be OK. If you choose slightly bigger value for ylim it will go through without any complain.

plot(x,y, log = "y", ylim = c(30,1.2))

Seems to me as a bug in axis. If you do not get any other response try to send it to r-bugs.

Cheers
Petr

On 19 May 2005 at 15:29, Christian Marquardt wrote:

> Hello,
>
> apologies if I'm overlooking the obvious... I would like to revert a
> logarithmic axis with R 2.1.0 on Linux, e.g. for using pressure as a
> vertical coordinate. Say we have
>
> x = seq(1,3, by = 0.01)
> y = exp(x)
>
> Plotting and reversing linear axis is fine
>
> plot(x,y)
> plot(x,y, ylim = c(30,1))
>
> as is a usual log-plot:
>
> plot(x,y, log = "y", ylim = c(1,30))
>
> However,
>
> plot(x,y, log = "y", ylim = c(30,1))
>
> fails with
>
> Error in axis(2, ...) : log - axis(), 'at' creation, _SMALL_ range:
> invalid {xy}axp or par;
> axp[0]= 10, usr[0:1]=(34.3721,0.872801)
> In addition: Warning message:
> CreateAtVector "log"(from axis()): usr[0] = 34.3721 > 0.872801 =
> usr[1] !
>
> What am I doing wrong here?
>
> Thanks a lot,
>
> Christian.
>
> ______________________________________________
> 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

Petr Pikal
petr.pikal@precheza.cz



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 Fri May 20 16:41:51 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:56 EST