Changeset 402 for trunk/SRC/Documentation/idldoc_assistant_output/ToBeReviewed/PLOTS/LABEL/label_date.html
- Timestamp:
- 07/23/09 11:18:49 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Documentation/idldoc_assistant_output/ToBeReviewed/PLOTS/LABEL/label_date.html
r338 r402 90 90 91 91 92 <font size="-1" color="#006633">required</font>92 93 93 94 94 … … 106 106 107 107 108 <font size="-1" color="#006633">required</font>108 109 109 110 110 … … 122 122 123 123 124 <font size="-1" color="#006633">required</font>124 125 125 126 126 … … 152 152 153 153 a format string which may contain the following: 154 %M for month (3 character abbr)155 %N for month (2 digit abbr)154 %M for month (3 characters abbr) 155 %N for month (2 digits abbr) 156 156 %D for day of month, 157 %Y for 4 digit year.157 %Y for 4 digits year. 158 158 %Z for last two digits of year. 159 159 For time: … … 225 225 226 226 <h3>Examples</h3><pre> 227 227 228 For example, to plot from Jan 1, 1993, to July 12, 1994: 228 Start_date = julday(1, 1, 1993) 229 End_date = julday(7, 12, 1994) 230 Dummy = LABEL_DATE(DATE_FORMAT='%N/%D') ;Simple mm/dd 231 x = findgen(end_date+1 - start_date) + start_date ;Time axis 232 PLOT, x, sqrt(x), XTICKFORMAT = 'LABEL_DATE', XSTYLE=1 233 (Plot with X axis style set to exact.) 234 229 230 IDL> Start_date = julday(1, 1, 1993) 231 IDL> End_date = julday(7, 12, 1994) 232 IDL> ; Simple mm/dd 233 IDL> Dummy = LABEL_DATE(DATE_FORMAT='%N/%D') 234 IDL> ;Time axis 235 IDL> x = findgen(end_date+1 - start_date) + start_date 236 IDL> ; Plot with X axis style set to exact 237 IDL> PLOT, x, sqrt(x), XTICKFORMAT = 'LABEL_DATE', XSTYLE=1 238 235 239 Example with times: 236 For example, to plot from 3PM, Jan 1, 1993, to 5AM, Jan 3, 237 1993: 238 Start_date = Julday(1,1,1993) ;Also starting offset 239 Start_time = (3+12)/24. ;Starting_time less offset 240 End_time = (Julday(1,3,1993) - Start_date) + 5./24. ;Ending 241 ;date/time - offset, note that the order of operations is 242 ; important to avoid loss of precision. 243 Dummy = LABEL_DATE(DATE_FORMAT='%D %M!C%H:%I', $ 244 offset=Start_date) ;MMM NN <new line> HH:MM format 245 x = findgen(20) * (End_time - Start_time) / 19 + start_time ;Time axis 246 PLOT, x, sqrt(x), XTICKFORMAT = 'LABEL_DATE', XSTYLE=1 240 241 For example, to plot from 3PM, Jan 1, 1993, to 5AM, Jan 3, 1993: 242 243 IDL> ; Also starting offset 244 IDL> Start_date = Julday(1,1,1993) 245 IDL> ; Starting_time less offset 246 IDL> Start_time = (3+12)/24. 247 IDL> End_time = (Julday(1,3,1993) - Start_date) + 5./24. 248 IDL> ; Ending date/time - offset, note that the order of operations is 249 IDL> ; important to avoid loss of precision 250 IDL> ; MMM NN <new line> HH:MM format 251 IDL> Dummy = LABEL_DATE(DATE_FORMAT='%D %M!C%H:%I', offset=Start_date) 252 IDL> ;Time axis 253 IDL> x = findgen(20) * (End_time - Start_time) / 19 + start_time 254 IDL> PLOT, x, sqrt(x), XTICKFORMAT = 'LABEL_DATE', XSTYLE=1 247 255 248 256 </pre><h3>Version history</h3> 249 257 250 258 <h4>Version</h4> 251 $Id: label_date.pro 3 27 2007-12-13 16:22:35Z pinsard $259 $Id: label_date.pro 371 2008-08-07 09:32:02Z pinsard $ 252 260 253 261 <h4>History</h4> 254 DMS, RSI. April, 1993.Written.255 DMS, RSI. March, 1997.Added Time format.262 DMS, RSI. April, 1993. Written. 263 DMS, RSI. March, 1997. Added Time format. 256 264 257 265 Copyright (c) 1993-1998, Research Systems, Inc. All rights reserved. 258 266 Unauthorized reproduction prohibited. 259 267 260 268 … … 272 280 273 281 <h4>Uses routines</h4> 274 LABEL_DATE_COM.275 282 276 283
Note: See TracChangeset
for help on using the changeset viewer.