[ncl-talk] [ncl-install] X axis labels

Adam Phillips asphilli at ucar.edu
Fri Aug 21 11:58:01 MDT 2015


Hi Pawan,
First, please only post NCL installation questions to the ncl-install email
list, and all others to ncl-talk. I have cc'd ncl-talk here.

It looks to me like the arrays input into the plotting function are lacking
latitude coordinate variables. Are you getting any error messages? If you
are and need to reply to this message please include them.

To see if you have coordinate variables you can do a printVarSummary on
your input array to see if there are any coordinate variables attached. If
you are unfamiliar with coordinate variables see page 7 in the
Mini-Language manual here:
http://www.ncl.ucar.edu/Document/Manuals/language_man.pdf

Coordinate variables tell NCL how to map your data onto the plot. It is
highly recommended that you use coordinate variable information whenever
you can when plotting in NCL. If coordinate variables are not present NCL
will map data onto each index value, as you are seeing in your second plot
where it is mapping your data onto 191 (?) indices.

All that being said, if you are happy with the plot itself and just want to
get your XB labels straightened out you could. Note though that you would
have to match up your 191 latitude indices with a latitude value for each
when you specify the XBValues and XBLabels:

res at tmXBMode      = "Explicit" ; Define own tick mark labels.
; without a latitude coordinate variable XBValues will range from
; 0->the number of latitude points-1
res at tmXBValues    = (/0,95,190/)
res at tmXBLabels   = (/"90S","0","90N"/)

(The above coding is a guess as to which index corresponds to each
latitude.)

Hopefully the above advice will help. If it doesn't, or if you have any
further questions, please respond to the ncl-talk email list and not to me
personally.
Adam





On Fri, Aug 21, 2015 at 7:49 AM, pawan vats <pawanvats5086 at gmail.com> wrote:

> Hi,  I'm use ncl for plotting, i am facing problem for in setting of  X
> axis label bar explicitly on Zonal plot between lat and pressure.
>
> when i give explicitly value to the
> res at tmYLMode      = "Explicit" ; Define own tick mark labels.
> res at tmXBValues    =
> (/90,80,70,60,50,40,30,20,10,0,10,20,30,40,50,60,70,80,90/)
> res at tmXBLabels   =
> (/"90S","80","70S","60S","50S","40S","30S","20S","10S","0","10N","20N","30N","40N","50N","60N","70N","80N","90N"/)
>
> only last half of value i get label in plot in half axis only half remain
> blank
>
>
> in case of automatic it label complete x axis  starting from 0 to 180
>  having difference of 10.
>  For your better under standing  in am attaching two simple plot in this
> mail.
> Thanks
> with regards
> Pawan
>
> _______________________________________________
> ncl-install mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-install
>
>


-- 
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/20150821/e0dee0c0/attachment.html 


More information about the ncl-talk mailing list