[R] Oceanographic lattice plots?

Deepayan Sarkar deepayan at stat.wisc.edu
Sat Oct 18 20:29:14 CEST 2003


On Saturday 18 October 2003 13:14, Mike Prager wrote:
> R 1.8.0 on Windows XP Professional.  A huge THANK YOU to the R Team for
> this marvelous software.
>
> I am making lattice plots of oceanographic data.  The usual layout does not
> conform to plotting conventions that marine scientists use when depth is
> the independent variable.  Under those conventions, plots are made with the
> origin at the upper left, depth on the vertical axis (increasing as it goes
> down), and the dependent variable on the horizontal axis (increasing to the
> right).

In case you decide to work on this yourself, this might be useful: 

Ideally, specifications like 

xyplot(depth ~ x, ylim = c(10, 0)) 

should reverse the y-axis direction. As pointed out some time back, this 
doesn't work in lattice currently, but that should be fixed in the future (it 
already works in my development version).

> That convention has implications not just in how axes are labeled and set
> up, but also when using smoothing routines such as panel.lowess(), because
> the smoothed values are on the horizontal axis, not the vertical axis.

These should be easy to modify.

Deepayan

> Before I start looking at and modifying the R code that makes up the
> relevant routines, I wonder if any reader has already developed R routines
> for this purpose?




More information about the R-help mailing list