labelling dates along a trackline
Question:
How can I label the dates along a track plot?
Example:
Solution:
Use the TAX_datestring function to get date setrings for a subset of the time steps.
Example:
(Note the use of continuation characters in the last line of the script):
Here is an alternative way to get the time labels: We can use the time axis and the `RETURN=tstart` syntax:! Define a dummy track line, position as a function of time.
DEFINE AXIS/T=1-JAN-1980:31-JAN-1985:30/UNIT=days tax
LET ypos = 40 *COS(L[GT=tax]/32)
LET xpos = 220 - 50 *SIN(L[GT=tax]/22)
! Make the basic track plot
GO basemap X=110E:40W Y=20S:50N 20
PLOT/VS/NOLAB/OVER XPOS,YPOS
! Label every 5th date. The labels could be positioned differently, using
! the 3rd argument of the LABEL command to control centering. Or, to put the
! labels a bit above the corresponding point location, add a small amount to
! the y positions, for instance `ypos + 0.04` in the second argument to LABEL.
REPEAT/L=5:60:5 (DEFINE SYMBOL tlab = "`T[GT=tax],RETURN=tstart`"; \
LABEL `xpos` `ypos` 1 0 0.1 ($tlab) )