hi Victor,
Since you are setting ttmMajorStride, time_axis_labels() has to tick every
365 or 366 days in your data (I'm assuming you'r using daily data set).
Now, if your data starts on 1-jan-1979, and then it reaches a leap year,
it'll get a 365th day on 31st December of that year (1980 in your case).
Since the format specified is "%y", it'll tick-mark only last two digits of
that year (80) and you'll get to see 80 twice. You can check this out by
setting ttmFormat to a long one (e.g., %y%c%d). Your best solution will be
to use ttmValues instead of ttmMajorStride:
resTick@ttmValues=(/(/1979,01,01,00,00,00/) \
, (/1980,01,01,00,00,00/) \
, (/1981,01,01,00,00,00/) \
... ...
, (/1995,01,01,00,00,00/) \
/)
This way you can explicitly specify where to tick mark the time axis.
Hope this helps,
-- *Arindam Chakraborty* Centre for Atmospheric and Oceanic Sciences Indian Institute of Science Bangalore - 560 012, INDIA. http://caos.iisc.ernet.in/ <http://caos.iisc.ernet.in/faculty/arch> On Mon, Jul 23, 2012 at 9:25 PM, Victor Torres <vtpuente@gmail.com> wrote: > Hi there, > I am plotting a time series of kelvin wave variance built from NOAA OLR > data at a certain point in lat and lon, however, as this dataset contains > information for leap years, when I plot the x-axis (this is, the time > axis), this is out of phase (it can be seen in the attached figure with > 365) and the values for years are repeated. > > To plot the time axis I am using this code: > > ;***************************************************** > ; Set special resources for the time axis > ;***************************************************** > resTick = True > resTick@ttmFormat = "%y" > resTick@ttmAxis = "XB" > resTick@ttmMajorStride = 365 > resTick@ttmMinorStride = 30 > > If I use the value of 366 instead, I have the second plot (366, -now the > years are not repeated but again everything is out of phase) > Do you know any other way to plot a "nice" and correct time axis whenever > we consider leap years? > > Thank you very much. > Regards > > Victor Torres > > -- > This message has been scanned for viruses and > dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is > believed to be clean. > _______________________________________________ > 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 Mon Jul 23 22:33:01 2012
This archive was generated by hypermail 2.1.8 : Tue Jul 24 2012 - 09:48:26 MDT