[ncl-talk] time_axis_labels: no labels produced in attached plots
burakows at ucar.edu
Thu Jul 24 14:44:46 MDT 2014
Thank you for the suggestion. I found that converting ts_10&DateTime from
"yyyymmddhh" to "hours since 2008-11-01 00:00:00" using wrf_times_c
and option 0 helped the labels to appear correctly on the x-axis.
On Wed, Jul 23, 2014 at 5:36 AM, Arindam Chakraborty <arch13 at gmail.com>
> Unless ts_10&DateTime has a "units" attribute, time_axis_label cannot
> convert the YYYYMMDD format to proper time format. You may need to create a
> time array using cd_inv_calendar() and send that to time_axis_label().
> *Arindam Chakraborty*
> CAOS, IISc, Bangalore-12
> On Wed, Jul 23, 2014 at 4:13 AM, Elizabeth Burakowski <burakows at ucar.edu>
>> I am trying to use time_axis_labels to produce x-axis labels in a
>> YYYYMMDD format for the bottom axis of 10 attached plots. I am using example
>> on the time_axis_labels page.
>> When I run my script, I do not receive any errors, however, I also do not
>> see any x-axis labels on my plot. The relevant portions of my script are
>> below. I can send along the full script if needed but I believe the below
>> contains the relevant portions for sake of keeping it short.
>> t = ispan(0,1447,1)
>> Variable: ts_10
>> Type: float
>> Total Size: 23168 bytes
>> 5792 values
>> Number of Dimensions: 2
>> Dimensions and sizes:  x [DateTime | 1448]
>> DateTime: [2008110100..2009043021]
>> Number Of Attributes: 1
>> _FillValue : 9.96921e+36
>> wks = gsn_open_wks("ps","WRF_ts_CLM")
>> res = True
>> res at gsnDraw = False
>> res at gsnFrame = False
>> ;----X-Axis formatting
>> res at tmXTOn = False
>> res at tmXBOn = True
>> res at tmXLabelAngleF = 90
>> ;----X-Axis labels
>> res at tmXBMode = "Manual"
>> restick = True
>> restick at ttmFormat = "%Y %N %D"
>> restick at ttmAxis = "XB"
>> restick at ttmMajorStride = 181
>> res at tiYAxisString = "Top soil layer"
>> xy1 = gsn_csm_xy(wks,t,ts_01,res)
>> res at tiYAxisString = "Middle soil layer"
>> xy2 = gsn_csm_xy(wks,t,ts_02,res)
>> res at tiYAxisString = "Bottom soil layer"
>> xy10 = gsn_csm_xy(wks,t,ts_10,res)
>> res1 = True
>> res2 = True
>> res2 at gsnAttachPlotsXAxis = True
>> plot = gsn_attach_plots(xy1,(/xy2,...,xy10/),res1,res2) ; There are 10
>> plots total, shortened to three in this example.
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ncl-talk