Hi everybody,
There have been a flurry of internal email messages on this topic, and
I thought I'd post what I hope is the answer to Duane's question. I
don't have Duane's full script, so I've attached a sample NCL script
that does what I think he is trying to accomplish.
Please note that Duane is not using "gsn" calls, but rather
object-oriented NCL code, so the attached code may look completely
different to what some of you are used to seeing.
As a side, if one *is* using gsn calls and wants to linearize an
irregular axis, then the way to do this is by setting the
gsnYAxisIrregular2Linear (or gsnXAxisIrregular2Linear) resource to
True. For an example of using this resource, please see the first
example at:
http://www.ncl.ucar.edu/Applications/slice.shtml
Now, back to Duane's object-oriented code: just setting trYAxisType to
"LinearAxis" is not going to work here, because that just effectively
makes the tickmarks on the Y axis linear, but it doesn't actually
transform the data along with it. In order to force the data through a
transformation, you need to overlay the contour plot on what we call a
"LogLin" plot. A "LogLin" plot is nothing more than something that
defines a linear or logarithmic transformation for the data being
overlaid on it.
The attached script creates and draws a contour plot with an irregular
Y axis. It then overlays this plot on a LogLin plot to linearize the Y
axis, and redraws the plot so you can see the transformation.
Note that this overlay business is effectively what happens behind the
scenes when you set the gsnYAxisIrregular2Linear to True and use
the gsn* functions.
BTW, the attached script was taken from the following example, if you
want to see more detail:
http://www.ncl.ucar.edu/Applications/BasicExamples/Contour/cn03.shtml
--Mary
On Mon, 10 Oct 2005 asphilli@ucar.edu wrote:
> Hi all,
>
> My apologies for the 2nd email but in my response below to Duane I meant
> to say:
> trYAxisType=LinearAxis
> and not
> trYAxisType=LogAxis
>
> Adam
>
>> Hi Duane,
>>
>> If I understand your question correctly, you would like to change the
>> Y-axis type from logarithmic to linear. Try setting the resource
>> trYAxisType=LogAxis
>>
>> http://www.ncl.ucar.edu/Document/Graphics/Resources/tr.shtml#trYAxisType
>>
>> If that doesn't work or if I misunderstand your question let us know.
>> Adam
>>
>>
>>>
>>> I have pressure-lat diagrams that have an irregular pressure gridding
>>> e.g., 1000, 900, 700, 300, 200, 100, 50, 10
>>> but would like to plot it such that the vertical pressure axis looks
>>> "regular"
>>> eg. equal spaced 100 mb increments.
>>> I've looked over many examples and still can't find one that does
>>> this but presume it is something that can be done.
>>>
>>> Thanks
>>> Duane
>>>
>>>
>>>
>>> Duane E. Waliser
>>> Jet Propulsion Laboratory, MS 183-505
>>> California Institute of Technology
>>> 4800 Oak Grove Drive, Pasadena, CA 91109
>>> 818-393-4094 (tel); 818 354 0966 (fax)
>>> http://hydro.jpl.nasa.gov
>>> duane.waliser@jpl.nasa.gov
>>>
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> ncl-talk@ucar.edu
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk@ucar.edu
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk@ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
ncl-talk@ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2b29 : Mon Oct 10 2005 - 21:01:23 MDT