Steve Murray wrote:
Dear R Users,

I am executing the following command to produce a line graph:

matplot(aggregate_1986[,1], aggregate_1986[,2:3], type="l", col=2:3)

On the x-axis I have values of Latitude (in column 1) ranging from -60 to +80 
(left to right on the x-axis). However, I wish to have these values shown in 
reverse on the x-axis, going from +80 to -60 (ie. North to South in terms of 
Latitude). I have tried doing this by altering the command as follows:

matplot(-aggregate_1986[,1], aggregate_1986[,2:3], type="l", col=2:3)

...but this produces the inverse sign of the latitude values along the axis - 
ie. it goes from -80 to +60.

How do I reverse the display of the axis labels correctly and of course, 
maintain the associated data values correctly?

Hi Steve,
Have a look at rev.axis in the plotrix package.

Jim

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to