[R] How to reverse the axis direction in log plot?
David Winsemius
dwinsemius at comcast.net
Mon Feb 8 18:42:16 CET 2010
On Feb 8, 2010, at 12:30 PM, bluesky315 at gmail.com wrote:
> On Mon, Feb 8, 2010 at 11:13 AM, Hrishi Mittal
> <hrishimittal at gmail.com> wrote:
>>
>> plot(1:10,1:10,log='xy',xlim=c(10,1))
>
> What if I want to use the automatically computed limits? I could use
> the following command. But it is not a very clean user interface, as
> the user has to compute the min and the max.
It's not clear why that would be. Both max and min are valid R
functions. Your code would run without further modification
> Is there a way that the
> user doesn't have to compute them?
>
> plot(u,v,log='xy',xlim=c(max(u),min(u)))
Equivalently:
plot(u,v,log='xy',xlim = rev(range(u) ) )
>
David Winsemius, MD
Heritage Laboratories
West Hartford, CT
More information about the R-help
mailing list