[R] Non-standard axis plotting
Paul Murrell
p.murrell at auckland.ac.nz
Sun Nov 9 21:32:42 CET 2003
Hi
Laura Quinn wrote:
> I am trying to plot positions on a grid where the x and y axis equate to
> longitudinal and latitudinal co-prdinates respectively. As these
> co-ordinates are southings and westings, i need the origin of my graph to
> contain the two highest values of each co0ordinate, with the values
> decreasing in both respects along both axes - I cannot seem to find any
> function within r to allow me to do this.
If you specify the axis limits as (highest, lowest), R should do the
rest. For example, ...
x <- -10:5
y <- exp(x)
par(mfrow=c(1,2))
plot(x, y, type="l")
plot(x, y, type="l", xlim=c(5, -10), ylim=c(150, 0))
Paul
--
Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
Auckland
New Zealand
64 9 3737599 x85392
paul at stat.auckland.ac.nz
http://www.stat.auckland.ac.nz/~paul/
More information about the R-help
mailing list