Re: Make the spacing between the tick marks equal without changing the explicit tick mark values.

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Fri Jul 02 2010 - 07:40:08 MDT

Hi Sabeer,

I think what you want is to set the gsnYAxisIrregular2Linear resource to True. See example 1 at:

http://www.ncl.ucar.edu/Applications/axes.shtml#ex1

--Mary

On Jul 2, 2010, at 4:24 AM, Sabeerali(sebi) wrote:

> Hi everyone,
>
> I have a frequency-wave number spectrum. In which the X axis is wave number(-4 to 4) and Y axis frequecy. The Y axis frequency values are explicitly defined.
> My Y axis values are (/0.01, 0.0125, 0.016666667, 0.025, 0.05, 0.1/). So when we go from bottom to top, obviously the spacing between the tick marks increases. That is quite clear. In the plot, I want to make the spacing between each tick mark to be equal without changing the above tick mark values( i.e. extent the bottom and compress the top of plot)
> Is there any resources or method in NCL so that I can make the spacing between the tick marks equal (By using the above values)
>
> Any help is highly appreciated..
> sabeer
>
>
> the plotting part is given below.
>
>
> wks = gsn_open_wks("eps", "freq_spec_new2")
> gsn_define_colormap(wks,"prcp_2")
> res=True
> res@cnFillOn=True
> res@gsnSpreadColors=True
> NW=4
> fMin=-0.5
> fMax=0.5
> WORK2=pow2({-NW:NW},{0:fMax})
> izero=ind(WORK2&freq.eq.0.0)
> WORK2(:,izero) = min(WORK2)
> res@tmYLMode = "Explicit" ; explicit labels
> pltPeriods = (/10,20,40,60,80,100/)
> res@tmYLValues = 1./pltPeriods ; freq location labels (/0.01, 0.0125, 0.016666667, 0.025, 0.05, 0.1/).
> res@tmYLLabels = pltPeriods ; labels themselves
> res@tmLabelAutoStride = True ; nice stride on labels
> res@tiXAxisOffsetYF = 0.2
>
> plot = gsn_csm_contour(wks,WORK2(freq|:,wave|:),res)
> end
>
>
> --
> **********************************
> Sabeerali
> Climate and Global Modeling Division
> Indian Institute of Tropical Meteorology
> Pashan, Pune, 411 008
> ****************************************
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Jul 2 07:40:13 2010

This archive was generated by hypermail 2.1.8 : Fri Jul 02 2010 - 07:45:13 MDT