[163] | 1 | |
---|
| 2 | |
---|
| 3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
---|
| 4 | <head> |
---|
| 5 | <title>label_date.pro (SAXO Documentation Assistant)</title> |
---|
| 6 | </head> |
---|
| 7 | |
---|
| 8 | <body text="#000000" bgcolor="#FFFFFF"> |
---|
| 9 | |
---|
| 10 | |
---|
| 11 | <!-- Navbar template takes a structure with the following fields: |
---|
| 12 | overview_href : |
---|
| 13 | overview_selected : |
---|
| 14 | dir_overview_href : |
---|
| 15 | dir_overview_selected : |
---|
| 16 | categories_href : |
---|
| 17 | categories_selected : |
---|
| 18 | index_href : |
---|
| 19 | index_selected : |
---|
| 20 | search_href : |
---|
| 21 | search_selected : |
---|
| 22 | file_selected : |
---|
| 23 | source_href : |
---|
| 24 | source_selected : |
---|
| 25 | help_href : |
---|
| 26 | help_selected : |
---|
| 27 | etc_selected : |
---|
| 28 | |
---|
| 29 | prev_file_href : |
---|
| 30 | next_file_href : |
---|
| 31 | |
---|
| 32 | view_single_page_href : |
---|
| 33 | view_frames_href : |
---|
| 34 | |
---|
| 35 | summary_fields_href : |
---|
| 36 | summary_routine_href : |
---|
| 37 | details_routine_href : |
---|
| 38 | |
---|
| 39 | title : |
---|
| 40 | subtitle : |
---|
| 41 | user : |
---|
| 42 | --> |
---|
| 43 | |
---|
| 44 | |
---|
| 45 | <table border="0" cellpadding="0" cellspacing="0" width="98%" bgcolor="#F0F0FF" valign="bottom"> |
---|
| 46 | <tr> |
---|
| 47 | <td width="10%"> |
---|
| 48 | <a href="label.html"><img src="./../../../prev.gif" border="0" alt="Previous"></a></td> |
---|
| 49 | <td width="80%" align="center" valign="center"> |
---|
| 50 | <font size=-1><i>SAXO Documentation Assistant</i>: <a href="./../../../home.html">Overview</a></font></td> |
---|
| 51 | <td width="10%" align="right"> |
---|
| 52 | <a href="label_gmt.html"><img src="./../../../next.gif" border="0" alt="Next"></a></td> |
---|
| 53 | </tr> |
---|
| 54 | </table> |
---|
| 55 | |
---|
| 56 | |
---|
| 57 | <h1><font size="-2">ToBeReviewed/PLOTS/LABEL/</font></h1> |
---|
| 58 | <h2>label_date.pro</h2> |
---|
| 59 | |
---|
| 60 | <dl> |
---|
| 61 | </dl> |
---|
| 62 | |
---|
| 63 | |
---|
| 64 | This function labels axes with dates and times. |
---|
| 65 | |
---|
| 66 | |
---|
| 67 | |
---|
| 68 | |
---|
| 69 | |
---|
| 70 | <a name="#_label_date"></a> |
---|
| 71 | |
---|
| 72 | <h2>label_date <font size="-1" color="#006633"> |
---|
| 73 | Plotting |
---|
| 74 | </font></h2> |
---|
| 75 | |
---|
| 76 | <p><font face="Courier"><i>result = </i>label_date(<i><a href="#_label_date_keyword_axis">axis</a>, <a href="#_label_date_keyword_index">index</a>, <a href="#_label_date_keyword_x">x</a></i>, <a href="#_label_date_keyword_DATE_FORMAT">DATE_FORMAT</a>=<i>DATE_FORMAT</i>, <a href="#_label_date_keyword_MONTHS">MONTHS</a>=<i>MONTHS</i>, <a href="#_label_date_keyword_OFFSET">OFFSET</a>=<i>OFFSET</i>, <a href="#_label_date_keyword__EXTRA">_EXTRA</a>=<i>_EXTRA</i>)</font></p> |
---|
| 77 | |
---|
| 78 | |
---|
| 79 | |
---|
| 80 | |
---|
| 81 | |
---|
| 82 | |
---|
| 83 | |
---|
| 84 | <h3>Parameters</h3> |
---|
| 85 | |
---|
| 86 | |
---|
| 87 | <a name="#_label_date_keyword_axis"></a> |
---|
| 88 | <h4>axis |
---|
| 89 | <font size="-1" color="#006633">in</font> |
---|
| 90 | |
---|
| 91 | |
---|
| 92 | |
---|
| 93 | |
---|
| 94 | |
---|
| 95 | |
---|
[402] | 96 | |
---|
[163] | 97 | </h4> |
---|
| 98 | |
---|
| 99 | |
---|
| 100 | |
---|
| 101 | |
---|
| 102 | |
---|
| 103 | <a name="#_label_date_keyword_index"></a> |
---|
| 104 | <h4>index |
---|
| 105 | <font size="-1" color="#006633">in</font> |
---|
| 106 | |
---|
| 107 | |
---|
| 108 | |
---|
| 109 | |
---|
| 110 | |
---|
| 111 | |
---|
[402] | 112 | |
---|
[163] | 113 | </h4> |
---|
| 114 | |
---|
| 115 | |
---|
| 116 | |
---|
| 117 | |
---|
| 118 | |
---|
| 119 | <a name="#_label_date_keyword_x"></a> |
---|
| 120 | <h4>x |
---|
| 121 | <font size="-1" color="#006633">in</font> |
---|
| 122 | |
---|
| 123 | |
---|
| 124 | |
---|
| 125 | |
---|
| 126 | |
---|
| 127 | |
---|
[402] | 128 | |
---|
[163] | 129 | </h4> |
---|
| 130 | |
---|
| 131 | |
---|
| 132 | |
---|
| 133 | |
---|
| 134 | |
---|
| 135 | |
---|
| 136 | |
---|
| 137 | <h3>Keywords</h3> |
---|
| 138 | |
---|
| 139 | |
---|
| 140 | <a name="#_label_date_keyword_DATE_FORMAT"></a> |
---|
| 141 | <h4>DATE_FORMAT |
---|
| 142 | |
---|
| 143 | |
---|
| 144 | |
---|
| 145 | |
---|
| 146 | |
---|
| 147 | |
---|
| 148 | |
---|
| 149 | |
---|
| 150 | </h4> |
---|
| 151 | |
---|
| 152 | |
---|
| 153 | a format string which may contain the following: |
---|
[402] | 154 | %M for month (3 characters abbr) |
---|
| 155 | %N for month (2 digits abbr) |
---|
[163] | 156 | %D for day of month, |
---|
[402] | 157 | %Y for 4 digits year. |
---|
[163] | 158 | %Z for last two digits of year. |
---|
| 159 | For time: |
---|
| 160 | %H for Hours, 2 digits. |
---|
| 161 | %I for Minutes, 2 digits. |
---|
| 162 | %S for Seconds, 2 digits. |
---|
| 163 | %% is %. |
---|
| 164 | Other characters are passed directly thru. |
---|
| 165 | For example, '%M %D, %Y' prints DEC 11, 1993 |
---|
| 166 | '%M %2Y' yields DEC 93 |
---|
| 167 | '%D-%M' yields 11-DEC |
---|
| 168 | '%D/%N/%Y' yields 11/12/1993 |
---|
| 169 | '%M!C%Y' yields DEC on the top line, 1993 on |
---|
| 170 | the bottom (!C is the new line graphic command). |
---|
| 171 | |
---|
| 172 | |
---|
| 173 | <a name="#_label_date_keyword_MONTHS"></a> |
---|
| 174 | <h4>MONTHS |
---|
| 175 | |
---|
| 176 | |
---|
| 177 | |
---|
| 178 | |
---|
| 179 | |
---|
| 180 | |
---|
| 181 | |
---|
| 182 | |
---|
| 183 | </h4> |
---|
| 184 | |
---|
| 185 | |
---|
| 186 | The names of the months, a twelve element string array. |
---|
| 187 | If omitted, use Jan, Feb, ..., Dec. |
---|
| 188 | |
---|
| 189 | |
---|
| 190 | <a name="#_label_date_keyword_OFFSET"></a> |
---|
| 191 | <h4>OFFSET |
---|
| 192 | |
---|
| 193 | |
---|
| 194 | |
---|
| 195 | |
---|
| 196 | |
---|
| 197 | |
---|
| 198 | |
---|
| 199 | |
---|
| 200 | </h4> |
---|
| 201 | |
---|
| 202 | |
---|
| 203 | An optional starting offset of the plot. |
---|
| 204 | Unfortunately, single precision floating point is not accurate |
---|
| 205 | enough to properly represent Julian times. This offset, which |
---|
| 206 | may be double precision, contains an offset that is added to |
---|
| 207 | all x values, before conversion to Julian date and time. |
---|
| 208 | |
---|
| 209 | |
---|
| 210 | <a name="#_label_date_keyword__EXTRA"></a> |
---|
| 211 | <h4>_EXTRA |
---|
| 212 | |
---|
| 213 | |
---|
| 214 | |
---|
| 215 | |
---|
| 216 | |
---|
| 217 | |
---|
| 218 | |
---|
| 219 | |
---|
| 220 | </h4> |
---|
| 221 | |
---|
| 222 | |
---|
| 223 | |
---|
| 224 | |
---|
| 225 | |
---|
[234] | 226 | <h3>Examples</h3><pre> |
---|
[402] | 227 | |
---|
[163] | 228 | For example, to plot from Jan 1, 1993, to July 12, 1994: |
---|
[402] | 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 | |
---|
[163] | 239 | Example with times: |
---|
| 240 | |
---|
[402] | 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 |
---|
| 255 | |
---|
[234] | 256 | </pre><h3>Version history</h3> |
---|
[163] | 257 | |
---|
| 258 | <h4>Version</h4> |
---|
[402] | 259 | $Id: label_date.pro 371 2008-08-07 09:32:02Z pinsard $ |
---|
[163] | 260 | |
---|
| 261 | <h4>History</h4> |
---|
[402] | 262 | DMS, RSI. April, 1993. Written. |
---|
| 263 | DMS, RSI. March, 1997. Added Time format. |
---|
[163] | 264 | |
---|
| 265 | Copyright (c) 1993-1998, Research Systems, Inc. All rights reserved. |
---|
[402] | 266 | Unauthorized reproduction prohibited. |
---|
[163] | 267 | |
---|
| 268 | |
---|
| 269 | |
---|
| 270 | <h3>Known issues</h3> |
---|
| 271 | |
---|
| 272 | |
---|
| 273 | |
---|
| 274 | <h4>Restrictions</h4> |
---|
| 275 | Only one date axis may be simultaneously active. |
---|
| 276 | |
---|
| 277 | |
---|
| 278 | <h3>Other attributes</h3> |
---|
| 279 | |
---|
| 280 | |
---|
| 281 | <h4>Uses routines</h4> |
---|
| 282 | |
---|
| 283 | |
---|
| 284 | |
---|
| 285 | <h4>Common blocks used</h4>label_date_com |
---|
| 286 | |
---|
| 287 | <font size="-3"><p> </p></font> |
---|
| 288 | <hr size="1" color="#CCCCCC"/> |
---|
| 289 | |
---|
| 290 | |
---|
| 291 | |
---|
| 292 | |
---|
[187] | 293 | <p><font color="gray" size="-3"> Produced by IDLdoc 2.0.</font></p> |
---|
[163] | 294 | |
---|
| 295 | </body> |
---|
[249] | 296 | </html> |
---|