Re: irregular axis and transforms

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon, 6 Dec 2004 08:38:28 -0700 (MST)

On Mon, 29 Nov 2004, James Boyle wrote:

> Sorry if this is a repeat to the list - but Dennis said that NCAR was
> hacked and I am unsure as to the disposition of the original message:
> Example 8 in of the pyngl examples shows how to plot and label a
> pressure axis at non-uniform levels.
> What I want to do is the same EXCEPT for irregular data. Example 8
> assumes that the input data are on an evenly spaced grid.
> As is very common, I have data at mandatory levels e.g. 1000., 925.,
> 850., 700., 600., 500., 400., 300., 250., 200., 150., 100.]
> To contour these correctly I think I have to set sfYArray to these
> values.
> If sfYArray is set then contour uses irregular transformations.
> I want a results exactly as in example 8 BUT using sfYArray= 1000.,
> 925., 850., 700., 600., 500., 400., 300., 250., 200., 150.,
> 100.
> Thus i want the Y axis reversed and using a log Y axis.
> I have tried to figure out how things work once sfYArray is set, there
> appears to be complex interactions between contour, transformations
> etc.
> I cannot get the log to work at all and even the linear axis has the
> labels equally spaced even if I follow the example.
> If I set sfYCStartV and sfYCEndV I can reproduce the nice example 8
> spacing and labeling but since the data are not evenly spaced the
> contour plot is shown incorrectly placed in pressure space.
> My bottom line is that I want to produce a plot just like Example 8,
> only for irregularly spaced data as input to contour. I do not want to
> interpolate the data to a regular grid - I want to see the data as it
> is (within the usual havoc that contouring wreaks).
> Maybe this cannot be done? I note that the meteogram example by John
> Ertl, does set sfYArray and sfXArray but retains the irregular spacing
> in the contour plot.
> Thanks for any help
> --Jim


We have implemented a couple new "ngl" resources that will allow you
to linearize or "logize" an irregular axis easily.

I've attached an example (and a resource file) to this message, but
you will need to email me for the latest version of PyNGL before it
will work (let me know what system you have).


pyngl-talk mailing list

Received on Mon Dec 06 2004 - 08:38:28 MST

This archive was generated by hypermail 2.2.0 : Thu Jan 19 2006 - 21:30:17 MST