Re: irregular axis and transforms

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed, 1 Dec 2004 15:49:42 -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

Hi Jim,

This is doable, but not currently in an easy fashion. I'm "whipping
up" some code that will do this via some resource settings. I should
have something either later today or tomorrow. It will behave
similarly to the current gsnX/YAxisIrregular2Linear/Log special
resources, in case you are familiar with them.


pyngl-talk mailing list
Received on Wed Dec 01 2004 - 15:49:42 MST

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