On Tue, 21 Nov 2006, Juerg Schmidli wrote:
> Hi all
>
> I have a problem setting the axis limits with contour plots. I want
> to compare, for instance, time-height plots of wind speed from
> observations with simulation results, where the observations are
> not complete. Say for example, that the observations are only available
> for the first 12 hours, but that I want to create a plot covering the
> entire day.
>
> I tried to set the resources trXMinF, trXMaxF, trYMinF, trYMaxF to
> the corresponding values, but I get the message
> "warning:ContourPlotInitialize: current transformation requires trYMinF
> to be within data coordinate range: resetting"
>
> I included a short test script to illustrate the problem.
>
> How can I set the plotting window to a region which is larger than
> that covered by the data?
>
> Any help is greatly appreciated
>
> Thanks,
> Juerg
Hi Juerg,
When you have the following two lines in your pyngl script:
res.sfXArray = t
res.sfYArray = z
this causes the internal code to signal that you have "irregular" X
and Y axes, even if t and/or z are regularly spaced. When you are in
"irregular" mode, then it will not allow you to extrapolate axes
values that are outside the limits of t and z.
There are a couple of solutions here, one a bit easier than the other.
The easier method you can use if t and z are regularly
spaced. Luckily, this is the case with your code.
Instead of setting the sfXArray and sfYArray arrays, you can
set the min/max values via:
res.sfXCStartV = min(t)
res.sfXCEndV = max(t)
res.sfYCStartV = min(z)
res.sfYCEndV = max(z)
PyNGL will then assume that your values are regularly spaced, and you
should then be able to set the tr* resources.
Let me know if this doesn't work for you.
--Mary
_______________________________________________
pyngl-talk mailing list
pyngl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
Received on Tue Nov 21 2006 - 08:40:49 MST
This archive was generated by hypermail 2.2.0 : Tue Nov 28 2006 - 15:20:02 MST