toplabel_date
Plotting
Parameters
axis
in
index
in
x
in
Keywords
MONTHS
OFFSET
Examples
For example, to plot from Jan 1, 1993, to July 12, 1994:
IDL> Start_date = julday(1, 1, 1993)
IDL> End_date = julday(7, 12, 1994)
IDL> ; Simple mm/dd
IDL> Dummy = LABEL_DATE(DATE_FORMAT='%N/%D')
IDL> ;Time axis
IDL> x = findgen(end_date+1 - start_date) + start_date
IDL> ; Plot with X axis style set to exact
IDL> PLOT, x, sqrt(x), XTICKFORMAT = 'LABEL_DATE', XSTYLE=1
Example with times:
For example, to plot from 3PM, Jan 1, 1993, to 5AM, Jan 3, 1993:
IDL> ; Also starting offset
IDL> Start_date = Julday(1,1,1993)
IDL> ; Starting_time less offset
IDL> Start_time = (3+12)/24.
IDL> End_time = (Julday(1,3,1993) - Start_date) + 5./24.
IDL> ; Ending date/time - offset, note that the order of operations is
IDL> ; important to avoid loss of precision
IDL> ; MMM NN HH:MM format
IDL> Dummy = LABEL_DATE(DATE_FORMAT='%D %M!C%H:%I', offset=Start_date)
IDL> ;Time axis
IDL> x = findgen(20) * (End_time - Start_time) / 19 + start_time
IDL> PLOT, x, sqrt(x), XTICKFORMAT = 'LABEL_DATE', XSTYLE=1
Version history
Version
$Id: label_date.pro 371 2008-08-07 09:32:02Z pinsard $
History
DMS, RSI. April, 1993. Written.
DMS, RSI. March, 1997. Added Time format.
Copyright (c) 1993-1998, Research Systems, Inc. All rights reserved.
Unauthorized reproduction prohibited.
Known issues
Restrictions
Only one date axis may be simultaneously active.
Other attributes
Uses routines
Common blocks used
label_date_com
Statistics
McCabe cyclic | 17 |
McCabe essential | 1 |
McCabe modular design | 1 |