Changeset 402 for trunk/SRC/Documentation/idldoc_html_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_html_output/ToBeReviewed/PLOTS/LABEL/label_date.html
r338 r402 124 124 125 125 126 <span class="attr">required</span>126 127 127 128 128 … … 138 138 139 139 140 <span class="attr">required</span>140 141 141 142 142 … … 152 152 153 153 154 <span class="attr">required</span>154 155 155 156 156 … … 182 182 <div class="comments"> 183 183 a format string which may contain the following: 184 %M for month (3 character abbr)185 %N for month (2 digit abbr)184 %M for month (3 characters abbr) 185 %N for month (2 digits abbr) 186 186 %D for day of month, 187 %Y for 4 digit year.187 %Y for 4 digits year. 188 188 %Z for last two digits of year. 189 189 For time: … … 252 252 253 253 <h3>Examples</h3><div class="preformat"> 254 254 255 For example, to plot from Jan 1, 1993, to July 12, 1994: 255 Start_date = julday(1, 1, 1993) 256 End_date = julday(7, 12, 1994) 257 Dummy = LABEL_DATE(DATE_FORMAT='%N/%D') ;Simple mm/dd 258 x = findgen(end_date+1 - start_date) + start_date ;Time axis 259 PLOT, x, sqrt(x), XTICKFORMAT = 'LABEL_DATE', XSTYLE=1 260 (Plot with X axis style set to exact.) 261 256 257 IDL> Start_date = julday(1, 1, 1993) 258 IDL> End_date = julday(7, 12, 1994) 259 IDL> ; Simple mm/dd 260 IDL> Dummy = LABEL_DATE(DATE_FORMAT='%N/%D') 261 IDL> ;Time axis 262 IDL> x = findgen(end_date+1 - start_date) + start_date 263 IDL> ; Plot with X axis style set to exact 264 IDL> PLOT, x, sqrt(x), XTICKFORMAT = 'LABEL_DATE', XSTYLE=1 265 262 266 Example with times: 263 For example, to plot from 3PM, Jan 1, 1993, to 5AM, Jan 3, 264 1993: 265 Start_date = Julday(1,1,1993) ;Also starting offset 266 Start_time = (3+12)/24. ;Starting_time less offset 267 End_time = (Julday(1,3,1993) - Start_date) + 5./24. ;Ending 268 ;date/time - offset, note that the order of operations is 269 ; important to avoid loss of precision. 270 Dummy = LABEL_DATE(DATE_FORMAT='%D %M!C%H:%I', $ 271 offset=Start_date) ;MMM NN <new line> HH:MM format 272 x = findgen(20) * (End_time - Start_time) / 19 + start_time ;Time axis 273 PLOT, x, sqrt(x), XTICKFORMAT = 'LABEL_DATE', XSTYLE=1 267 268 For example, to plot from 3PM, Jan 1, 1993, to 5AM, Jan 3, 1993: 269 270 IDL> ; Also starting offset 271 IDL> Start_date = Julday(1,1,1993) 272 IDL> ; Starting_time less offset 273 IDL> Start_time = (3+12)/24. 274 IDL> End_time = (Julday(1,3,1993) - Start_date) + 5./24. 275 IDL> ; Ending date/time - offset, note that the order of operations is 276 IDL> ; important to avoid loss of precision 277 IDL> ; MMM NN <new line> HH:MM format 278 IDL> Dummy = LABEL_DATE(DATE_FORMAT='%D %M!C%H:%I', offset=Start_date) 279 IDL> ;Time axis 280 IDL> x = findgen(20) * (End_time - Start_time) / 19 + start_time 281 IDL> PLOT, x, sqrt(x), XTICKFORMAT = 'LABEL_DATE', XSTYLE=1 274 282 </div> 275 283 <h3>Version history</h3> 276 284 277 285 <h4>Version</h4><div class="preformat"> 278 $Id: label_date.pro 3 27 2007-12-13 16:22:35Z pinsard $286 $Id: label_date.pro 371 2008-08-07 09:32:02Z pinsard $ 279 287 </div> 280 288 <h4>History</h4><div class="preformat"> 281 DMS, RSI. April, 1993.Written.282 DMS, RSI. March, 1997.Added Time format.289 DMS, RSI. April, 1993. Written. 290 DMS, RSI. March, 1997. Added Time format. 283 291 284 292 Copyright (c) 1993-1998, Research Systems, Inc. All rights reserved. 285 293 Unauthorized reproduction prohibited. 286 294 </div> 287 295 … … 299 307 300 308 <h4>Uses routines</h4><div class="preformat"> 301 LABEL_DATE_COM.302 309 </div> 303 310
Note: See TracChangeset
for help on using the changeset viewer.