Re: X Axis Labels

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Wed Jun 01 2011 - 21:29:22 MDT

Hi Cory,
If I understand what you've tried so far, you've done this:
res@tmXBMode = "Automatic"
that resulted in correct but too few labels...

And you've tried something like this:
res@tmXBMode = "Explicit"
res@tmXBValues = ref&time
res@tmXBLabels = ref&time
that resulted in a bunch of labels at the far left of the plot and an
error message...

Have you tried the latter method while subsetting the time arrays:
res@tmXBMode = "Explicit"
res@tmXBValues = ref&time(0::96) ; choose the first time thru the last
res@tmXBLabels = res@tmXBValues ; time and stride by 96

If that doesn't help or if I misunderstood your query let the group know..
Adam

> Hi all,
> I'm having a problem getting labels on the x-axis of a plot to show up.
> My data have time along the x-axis and height along the y-axis so I set
> the coordinates as those arrays of values. When I print the variable
> I'm trying to plot it appears that my coordinates have been set up
> correctly as I get the following output:
> Variable: ref
> Type: float
> Total Size: 4816000 bytes
> 1204000 values
> Number of Dimensions: 2
> Dimensions and sizes: [lev | 500] x [time | 2408]
> Coordinates:
> lev: [9.836..49092.44]
> time: [14:04:13..19:39:34]
> Number Of Attributes: 5
> valid_time : 20050216
> missing_value : -500
> units : dBZ
> long_name : Reflectivity
> _FillValue : -500
>
> My time is formatted as HH:MM:SS and maybe that is causing a problem.
> I'm using gsn_csm_contour to plot ref and have tried messing around with
> tmXBMode to no avail. If I set it as "Explicit" it tries to plot all
> 2408 tick marks and labels and then gives an error when it reaches 256.
> When tmXBLabelStride is set it appears to ignore my labels altogether.
> If I leave it as "Automatic" then it labels the axis nicely, but with
> values from 0 to 2400 with labels every 400 values. How can I get my
> times to show up along the bottom where I want them? The height values
> on the y-axis show up fine with no problems so I must be doing something
> wrong with the x-axis labels and/or values. Thanks.
>
> Cory
>
> --
> ========================================
> Cory Wolff
> Associate Scientist
> National Center for Atmospheric Research
> 303.497.2845
> cwolff@ucar.edu
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>

__________________________________________________
Adam Phillips
National Center for Atmospheric Research
Climate and Global Dynamics Division
P.O. Box 3000
Boulder, CO 80307-3000 tel: (303) 497-1726
http://www.cgd.ucar.edu/cas/asphilli

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jun 1 21:29:30 2011

This archive was generated by hypermail 2.1.8 : Thu Jun 09 2011 - 14:56:48 MDT