[ncl-talk] irregular (explicit) but equally-spaced axis

Yan-Ting Chen aquarius83523 at gmail.com
Thu May 31 10:51:54 MDT 2018


 Hi Adam and NCL users,

Thank you Adam for reply but it doesn't work for me. In your example plot
type is gsn_csm_contour, however, I am doing it with gsn_csm_xy for scatter
plot. Thus, I can't directly attach the data to an irregularly-spaced axis.
With similar resource I get a warning message
warning: gsnYAxisIrregular2Linear is not a valid resource in ******
and a linear y-axis with explicit label. The levels are not equally-spaced.

The following is how I set related resource:

  ypts = (/1.,3.,10.,30.,100./)

  res = True
  res at xyMarkLineModes   = "Markers"
  res at xyMarkers             = 16
  res at xyMarkerSizeF     = 0.005
  res at trYMinF = 0.1
  res at trYMaxF = 50.

  res at tmYLMode          = "Explicit"
  res at tmYLValues        = ypts
  res at tmYLLabels        = ypts
  res at gsnYAxisIrregular2Linear = True
  (gsnYAxisIrregular2Linear is not valid.)


Sincerely,

Yanting

On Wed, May 30, 2018 at 11:32 PM, Adam Phillips <asphilli at ucar.edu> wrote:

> Hi Yanting,
> I believe the behavior that you are after is NCL's default behavior when
> it comes to axes. I've modified Applications example axes_1.ncl, and
> attached the script and resulting plot here. As you can see, the distance
> between 0, 2, 10, 30 and 100 is equal. See other examples on the axes page
> here:
> http://www.ncl.ucar.edu/Applications/axes.shtml
>
> Hope that helps. If you have any further questions please respond to
> ncl-talk.
> Adam
>
>
> On Mon, May 28, 2018 at 12:19 PM, Yan-Ting Chen <aquarius83523 at gmail.com>
> wrote:
>
>> Hi all,
>>
>> I want to draw 2 variables in a single scattering plot with irregular
>> Y-axis. I know there is gsnYAxisIrregular2Log etc. in hand. The problem is,
>> I want a hybrid linear-logarithmic vertical scale like ypts = (/0., 2.,
>> 10., 30., 100./) with equal space. That is, interval between 0 and 2 is
>> identical to interval between 30 and 100.
>>
>> I tried example xy_30.ncl with specified ypts above and get a chart with
>> somewhat distorted Y axis. I guess it's logarithmic but this is not what I
>> want. (see attachment.) Is there any way to get an equally-spaced irregular
>> (say, explicit level) axis?
>>
>>
>> Sincerely,
>> Yanting
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
>
> --
> Adam Phillips
> Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
> www.cgd.ucar.edu/staff/asphilli/   303-497-1726
>
> <http://www.cgd.ucar.edu/staff/asphilli>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180601/632a1602/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: irregular.png
Type: image/png
Size: 97955 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180601/632a1602/attachment.png>


More information about the ncl-talk mailing list