Debian Codegraph @

docs/manual/chapters/axis.xml

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 (C) Copyright 1996-2016 ECMWF.
4
5 This software is licensed under the terms of the Apache Licence Version 2.0
6 which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
7 In applying this licence, ECMWF does not waive the privileges and immunities
8 granted to it by virtue of its status as an intergovernmental organisation nor
9 does it submit to any jurisdiction.
10 -->
11
12 <chapter id="Axis_Plotting" label="9">
13 <title>Axis Plotting</title>
14
15 <xi:include href="../phrases/chapterinfo_mod.xml"
16 xmlns:xi="http://www.w3.org/2001/XInclude" />
17
18 <section id="Axis_Introduction">
19 <title>Introduction</title>
20
21 <para><productname>Magics</productname> axis facilities allow users to plot horizontal
22 and vertical axes on non-geographical plots. These facilities include axis labelling, axis title plotting and
23 subdivision of axes with ticks. There is also a facility for plotting automatic
24 date/time axes.</para>
25
26 <para>Parameters exist which give the user control over all aspects of axis plotting,
27 e.g. position, orientation, colour, thickness etc. Axis plotting is achieved by
28 calling the action routine <function>PAXIS</function>, which draws one axis each
29 time it is called. Any axis parameters required must be set before <function>PAXIS</function>
30 is called. <function>PAXIS</function> may be called as often as it is needed. If more than one axis is to be drawn with the same axis orientation and
31 position, users should ensure that there is sufficient room between the subpage
32 and page frame lines.</para>
33
34 <para>Axis plotting is based on the <productname>Magics</productname> subpage.
35 It is necessary to ensure that the dimensions of the subpage are
36 set before <function>PAXIS</function> is called, as the requested axis will be
37 drawn on one of the subpage frame lines. This means that the parameters
38 <parameter>SUBPAGE_X_LENGTH</parameter> and <parameter>SUBPAGE_Y_LENGTH</parameter>
39 should be set to the required values and <parameter>SUBPAGE_MAP_PROJECTION</parameter>
40 should be set to '<code>CARTESIAN</code>'.
41 Horizontal axes are always plotted along the bottom or top line of the subpage frame.
42 Vertical axes are plotted along the left or right side of the subpage frame.</para>
43
44 <para>The axes, which may be regular, logarithmic or user-defined, may be subdivided
45 with tick marks. Further subdivision between tick marks, i.e. minor ticks, is also
46 possible. Grid lines, i.e. lines joining corresponding tick marks, may be plotted.
47 Ticks may be labelled either on the tick marks or between tick marks.</para>
48
49 <para><productname>Magics</productname> parameters exist to control all aspects of axis drawing.
50 These parameters start with the prefix <parameter>AXIS</parameter>, e.g.
51 <parameter>AXIS_LINE_THICKNESS</parameter>.</para>
52
53 <para>An axis consists of seven different parts and the drawing of each part can be turned on or off.
54 The parts are: line, title, tip title, ticks, minor ticks, tick labels and grid. The line, ticks,
55 tick labels and title are on by default. The grid, minor ticks and tip title are off by default.
56 </para>
57
58 <para>Axes may be annotated in two ways, one called the axis title and the other called
59 the <firstterm>axis tip title</firstterm>. The axis title is centred on the axis and
60 the tip title is plotted at the end of the axis. The tip title would normally be
61 used as a unit specification. The default text string for the title and tip title are blank.
62 </para>
63
64 </section>
65
66
67 <section id="Axis_Positioning">
68 <title>Axis Positioning</title>
69
70 <para>Axes may be drawn on any of the subpage frame lines. This is controlled by the parameter
71 <parameter>AXIS_ORIENTATION</parameter> which may be set to
72 '<code>HORIZONTAL</code>' (X-axis) or '<code>VERTICAL</code>' (Y-axis), the default being
73 '<code>HORIZONTAL</code>' .</para>
74
75 <para>The position of an axis is controlled by the parameter
76 <parameter>AXIS_POSITION</parameter>. For the x-axis it can take one of the
77 values '<code>BOTTOM</code>' or '<code>TOP</code>' and for the y-axis the values
78 '<code>LEFT</code>' or '<code>RIGHT</code>' may be used.</para>
79
80 <para>An axis is normally drawn on one of the subpage frames. However if
81 <function>PAXIS</function> is called more than once with the same
82 <parameter>AXIS_POSITION</parameter> value, each subsequent axis will be drawn between
83 the previously drawn axis and the page frame, if there is sufficient room available.
84 For example two calls with <parameter>AXIS_POSITION</parameter> set to '<code>RIGHT</code>'
85 will draw the first axis on the right-hand subpage frame, and the second axis to
86 the right of the first one, if there is room between the subpage and page.</para>
87
88 <para>It is possible to draw the lines of an axis in any position and not just at
89 the bottom/top/left/right of the axis. This is achieved by setting the parameter
90 <parameter>AXIS_POSITION</parameter> to '<code>AUTOMATIC</code>' and the
91 parameter <parameter>AXIS_LINE_POSITION</parameter> to the required position.
92 The position of the line should be given in centimetres from the lower left hand
93 corner of the subpage. <parameter>AXIS_LINE_POSITION</parameter> may be used for
94 both the X and Y axes, depending on the value set in the parameter
95 <parameter>AXIS_ORIENTATION</parameter> (<code>HORIZONTAL</code> or <code>VERTICAL</code>).
96 It is possible to plot ticks, minor ticks, titles etc on
97 <code>POSITIONAL</code> axes. However, users should be aware that the ticks etc
98 will only be plotted on the left side of vertical lines and on the bottom side
99 of horizontal lines.</para>
100
101 <para>There is no limit to the number of times <function>PAXIS</function> may be called,
102 even with the same <parameter>AXIS_POSITION</parameter>, as long as there is sufficient
103 room. When there is insufficient room for the axis, an error message is generated
104 and the axis is not drawn.</para>
105
106 <para>The parameter <parameter>AXIS_LINE</parameter> controls whether the axis
107 line is actually drawn or not. The default value is '<code>ON</code>' and it
108 should be set to '<code>OFF</code>' if the line is not required.</para>
109 </section>
110
111
112 <section id="Axis_Line">
113 <title>Axis Line styling</title>
114
115 <para>The colour and thickness of the axis may be set by using the parameters
116 <parameter>AXIS_LINE_COLOUR</parameter> and <parameter>AXIS_LINE_THICKNESS</parameter>.
117 The default colour of the axis line is the colour of the subpage frame,
118 i.e. <parameter>SUBPAGE_FRAME_COLOUR</parameter>, and the default thickness is
119 <code>2</code>.</para>
120
121 <section id="Axis_Grid_Lines">
122 <title>Axis Grid Lines</title>
123
124 <para>Grid lines may be drawn from every tick by setting the parameter
125 <parameter>AXIS_GRID</parameter> to '<code>ON</code>' . The colour, thickness
126 and line style of grid lines may be controlled with the parameters
127 <parameter>AXIS_GRID_COLOUR</parameter>, <parameter>AXIS_GRID_THICKNESS</parameter>
128 and <parameter>AXIS_GRID_LINE_STYLE</parameter>. The default values for
129 these parameters are '<code>YELLOW</code>', <code>1</code> and '<code>SOLID</code>'
130 respectively. Axis grids will always be drawn within the subpage even if
131 the axis itself is outside the subpage.</para>
132
133 </section>
134
135 <section id="Axis_Ticks">
136 <title>Axis Ticks</title>
137
138 <para>Axis ticks are tick marks showing the subdivision of an axis. Users may control
139 the drawing of tick marks by setting the parameter <parameter>AXIS_TICK</parameter>
140 to '<code>ON</code>' or '<code>OFF</code>', the default being '<code>ON</code>'.</para>
141
142 <para>The axis tick attributes colour, size and thickness are controlled by the
143 parameters <parameter>AXIS_TICK_COLOUR</parameter>, <parameter>AXIS_TICK_SIZE</parameter>
144 and <parameter>AXIS_TICK_THICKNESS</parameter>.</para>
145
146 <!-- Insert diagram here? -->
147
148 <para>An axis can be defined in four different ways with the <parameter>AXIS_TYPE</parameter>
149 values '<code>REGULAR</code>' (the default), '<code>LOGARITHMIC</code>',
150 '<code>POSITION_LIST</code>' and '<code>DATE</code>'.</para>
151
152 <itemizedlist>
153
154 <listitem>
155 <para>The '<code>REGULAR</code>' type is a regular axis defined by a first and a
156 last value. The spacing of the ticks may be controlled by the user by setting
157 <parameter>AXIS_TICK_INTERVAL</parameter> to the required interval.
158 If not set by the user, <productname>Magics</productname> will select an
159 interval that gives about 8 tick marks.
160 </para>
161 </listitem>
162
163 <listitem>
164 <para>The '<code>POSITION_LIST</code>' type may be a regular or irregular axis
165 with the positions of the ticks specified by the user. Tick positions are
166 measured from the starting point of the axis, i.e. from the left side for
167 horizontal axes and from the bottom for vertical axes. They should be passed
168 to <productname>Magics</productname> in a real array as follows:
169 </para>
170
171 <programlisting> CALL <function>PSET1R</function>('<parameter>AXIS_TICK_POSITION_LIST</parameter>',PLIST,N)</programlisting>
172
173 <para>where <code>PLIST</code> is a real array of size <code>N</code> holding the tick positions.</para>
174
175 <para>Normally the positions of the ticks for <parameter>POSITION_LIST</parameter> are specified
176 in centimetres but can be given in axis (or user) units by setting the parameter
177 <parameter>AXIS_TICK_LABEL_UNITS</parameter> to '<code>USER</code>' , the default being
178 '<code>CM</code>'. In this case <productname>Magics</productname> will assume that the positions
179 of the ticks in <parameter>AXIS_TICK_POSITION_LIST</parameter> are in axis units
180 and will calculate the actual positions on the axis.</para>
181
182 'DATE' is a date/time axis and is fully described in Date/Time Axis Plotting
183
184 </listitem>
185
186 <listitem>
187 <para>'<code>DATE</code>' is a date/time axis and is fully described in the following section.
188 </para>
189 </listitem>
190
191 </itemizedlist>
192
193
194
195 <section id="Axis_Minor_ticks">
196 <title>Axis Minor Ticks</title>
197
198 <para>Minor tick marks are smaller than, and plotted between, tick marks.
199 They may be obtained by setting <parameter>AXIS_MINOR_TICK</parameter> to
200 '<code>ON</code>' and setting <parameter>AXIS_MINOR_TICK_COUNT</parameter>
201 to an integer specifying the number of minor tick marks desired between
202 two ticks. The default values for <parameter>AXIS_MINOR_TICK</parameter>
203 and <parameter>AXIS_MINOR_TICK_COUNT</parameter> are '<code>OFF</code>' and 1,
204 respectively.</para>
205
206 <para>The colour, size and thickness of minor ticks may be controlled by
207 setting the parameters <parameter>AXIS_MINOR_TICK_COLOUR</parameter>,
208 <parameter>AXIS_MINOR_TICK_SIZE</parameter> and <parameter>AXIS_MINOR_TICK_THICKNESS</parameter>.
209 </para>
210
211 </section>
212
213 </section>
214
215
216 <section id="Axis_Spacing">
217 <title>Spacing Control of Axis Ticks, Minor Ticks, Grid Lines</title>
218
219 <para>In order to achieve good quality axis plotting without cluttering,
220 it is important that ticks, minor ticks and grid lines do not come too close
221 to each other. One parameter controls this: <parameter>AXIS_MINOR_TICK_MIN_GAP</parameter>.
222 Using this parameter, the user may specify the smallest acceptable gap
223 between ticks etc. The default value is 0.05cm . Note that the same parameter
224 controls the three different features.</para>
225
226 </section>
227 </section>
228
229
230
231 <section id="Axis_Labels">
232 <title>Axis Labels</title>
233
234 <para>Labelling of axes consists of two different types; text labelling and unit labelling.</para>
235
236
237 <section id="Axis_Text_Labels">
238 <title>Text Labels</title>
239
240 <para>There are two different types of text labelling, labelling of the axis itself,
241 called the title text, and labelling of the end of an axis, called the tip title text
242 <!--(see Diagram IX-1)-->.</para>
243
244 <para>A title text may be plotted by setting the <parameter>AXIS_TITLE_TEXT</parameter>
245 to the text required, the default is a blank text string. The parameter
246 <parameter>AXIS_TITLE</parameter> should be set to '<code>ON</code>' which is
247 the default. It should be set to '<code>OFF</code>' if no title text is required.
248 Likewise, a tip title text may be plotted by setting <parameter>AXIS_TIP_TITLE_TEXT</parameter>
249 to the text required and setting <parameter>AXIS_TIP_TITLE</parameter> to '<code>ON</code>',
250 which is the default.</para>
251
252
253
254
255 <para>The title text is always centre justified but the orientation of the text
256 may be altered with the parameter <parameter>AXIS_TITLE_ORIENTATION</parameter>.
257 The three valid values for this parameter are '<code>PARALLEL</code>'
258 (the default), '<code>HORIZONTAL</code>' and '<code>VERTICAL</code>'. The
259 orientation of the tip title text is controlled by the parameter
260 <parameter>AXIS_TIP_TITLE_ORIENTATION</parameter>. Valid values are
261 '<code>PARALLEL</code>', '<code>HORIZONTAL</code>' (the default) and
262 '<code>VERTICAL</code>'.</para>
263
264
265 <para>Parameters exist to control the colour, height and quality of the title
266 text and the tip title text, e.g. <parameter>AXIS_TITLE_COLOUR</parameter>,
267 <parameter>AXIS_TIP_TITLE_QUALITY</parameter> .</para>
268 </section>
269
270 <section id="Axis_Unit_Labels">
271 <title>Unit Labels</title>
272
273 <para>Unit labelling is actually the labelling of the axis ticks. This is
274 controlled by the parameter <parameter>AXIS_TICK_LABEL</parameter> which
275 may be set to '<code>ON</code>' or '<code>OFF</code>', the default being
276 '<code>ON</code>'.</para>
277
278 <para>Parameters exist to control the height, quality and colour of the
279 tick labels, e.g.</para>
280
281 <programlisting> CALL <function>PSETC</function>('<parameter>AXIS_TICK_LABEL_COLOUR</parameter>','BLUE')</programlisting>
282
283 <para>The format of the tick label may be specified by setting the parameter
284 <parameter>AXIS_TICK_LABEL_FORMAT</parameter>, the default being
285 '<code>(AUTOMATIC)</code>' .</para>
286
287
288
289 <para>Tick labels can be '<code>HORIZONTAL</code>' (default) or '<code>VERTICAL</code>'
290 and this is controlled by the parameter <parameter>AXIS_TICK_LABEL_ORIENTATION</parameter>.
291 The user has control over the position of the tick label, by setting the
292 parameter <parameter>AXIS_TICK_LABEL_POSITION</parameter>.</para>
293
294
295 <para>The default position '<code>ON_TICK</code>' centres the value around
296 the tick mark. The '<code>INTER_TICK</code>' position shifts all tick labels
297 to the right, centring them between two tick marks. For example, the first
298 tick label will be drawn between the first and the second tick.</para>
299
300
301 <para>It is also possible to suppress printing of first and/or last tick label
302 which is sometimes useful for space reasons. This may be achieved by setting
303 the parameters <parameter>AXIS_TICK_LABEL_FIRST</parameter> and
304 <parameter>AXIS_TICK_LABEL_LAST</parameter> respectively. The default value
305 for both is '<code>ON</code>', which means that the first and last tick labels
306 will be plotted.</para>
307
308 <para>The parameter <parameter>AXIS_TICK_LABEL_TYPE</parameter> enables the
309 user to specify the type of tick labels to be plotted, e.g.
310 '<code>LABEL_LIST</code>', '<code>NUMBER</code>', '<code>LATITUDE</code>' and
311 '<code>LONGITUDE</code>'. The default tick label type depends on the value
312 set in <parameter>AXIS_TYPE</parameter> which may be '<code>REGULAR</code>',
313 '<code>LOGARITHMIC</code>' or '<code>POSITION_LIST</code>'. For
314 '<code>REGULAR</code>' and 'LOGARITHMIC', the user may specify any of the
315 valid values for <parameter>AXIS_TICK_LABEL_TYPE</parameter> and the default
316 value in these two cases is '<code>NUMBER</code>'. However, if
317 <parameter>AXIS_TYPE</parameter> is set to '<code>POSITION_LIST</code>' then
318 '<code>LABEL_LIST</code>' is the only value allowed for
319 <parameter>AXIS_TICK_LABEL_TYPE</parameter>.</para>
320
321 <para>User defined tick labels should be passed to <productname>Magics</productname>
322 in a character type array as follows:</para>
323
324 <programlisting> CALL <function>PSET1C</function>('<parameter>AXIS_TICK_LABEL_LIST</parameter>',TLIST,M)</programlisting>
325
326 <para>where <code>TLIST</code> is an array of dimension <code>M</code>.
327 The nth element of the array will be the label of the nth tick mark.
328 If some of the ticks are to be unlabelled, the appropriate elements of the
329 array should be set blank.</para>
330
331 <para>Label types '<code>NUMBER</code>', '<code>LATITUDE</code>' and
332 '<code>LONGITUDE</code>' produce numeric values calculated from the first
333 axis value and the tick interval. The special cases, '<code>LATITUDE</code>'
334 and '<code>LONGITUDE</code>', plot the number with a degree sign and the
335 direction (N/S/E/W).</para>
336
337 <para>It is possible to suppress the labelling of selected ticks using the
338 parameter <parameter>AXIS_TICK_LABEL_FREQUENCY</parameter>. If set to n,
339 only every nth tick mark will be labelled.</para>
340
341 <para>Logarithmic axes are labelled only at the cycle end points
342 (i.e. ..,0.1,1,10,..). However if no endpoint exists (e.g. 2 to 9)
343 all ticks are labelled. If there is only one endpoint it is labelled
344 together with the first and the last ticks.</para>
345
346 </section>
347
348
349 </section> <!-- id="Axis_Labels" -->
350
351
352
353
354
355 <section id="Axis_Date_Time">
356 <title>Date/Time Axis Plotting</title>
357
358 <para>There are facilities for plotting an automatic date/time axis in
359 <productname>Magics</productname>. The parameter <parameter>AXIS_TYPE</parameter>
360 should be set to '<code>DATE</code>' when a date/time axis is required and the
361 parameter <parameter>AXIS_DATE_TYPE</parameter> should be set to indicate the type
362 of date/time axis required. Following is a description of how to use the date/time
363 axis facilities.</para>
364
365 <section id="AXIS_DATE_TYPE">
366 <title>AXIS_DATE_TYPE</title>
367
368 <para>The parameter <parameter>AXIS_DATE_TYPE</parameter> allows the user to
369 determine which type of axis is to be drawn. Valid values are '<code>HOURS</code>',
370 '<code>DAYS</code>', '<code>MONTHS</code>' and '<code>YEARS</code>'.
371 The value set will determine the axis units for a date/time axis and will
372 indicate that the user requests <productname>Magics</productname> to label the
373 major tick marks on the current axis with date/time and that the text of the
374 labels to be plotted at ticks etc be calculated by <productname>Magics</productname>.</para>
375
376 <para>For <code>HOURS</code>, <code>DAYS</code>, <code>MONTHS</code> and <code>YEARS</code>,
377 the parameters <parameter>AXIS_DATE_MIN_VALUE</parameter>,
378 <parameter>AXIS_DATE_MAX_VALUE</parameter> and <parameter>AXIS_TICK_INTERVAL</parameter>
379 will enable <productname>Magics</productname> to calculate the number of
380 days/months/years to be plotted on the axis. <parameter>AXIS_DATE_MIN_VALUE</parameter>
381 should be set to the starting date required with the format
382 YYYY-MM-DD HH:mm:ss (YYYY =year, e.g. 1991, 2002, MM =month, e.g. June=06,
383 DD = day of month (1-31), HH =hour, mm =minutes and ss =seconds).
384 This is a character value, i.e. for 1200UTC 15 June 1991 the value set in
385 <parameter>AXIS_DATE_MIN_VALUE</parameter> is '<code>1991-06-15 12:00:00</code>'.
386 Likewise, the ending date should be set in <parameter>AXIS_DATE_MAX_VALUE</parameter>.
387 The actual units used to plot the axis, i.e. days, months or years, is determined
388 by the value set in <parameter>AXIS_DATE_TYPE</parameter>. The parameter
389 <parameter>AXIS_TICK_INTERVAL</parameter> can be used to control the amount of
390 major ticks to be plotted. For example if set to 2.0, every second tick will
391 be plotted. <productname>Magics</productname> will calculate the appropriate
392 date for each of the labels.</para>
393
394 <para>The major ticks on the axis will represent the main units of the axis as
395 given by <parameter>AXIS_DATE_TYPE</parameter>. Minor ticks may be plotted for
396 the entity below the main units of the axis. For example, if <code>DAYS</code> are the
397 main units, <code>HOURS</code> may be plotted as minor ticks. Minor ticks will not be
398 labelled.</para>
399 </section>
400
401 <section id="Axis_Axis_Units">
402 <title>Axis Units</title>
403
404 <para>The units of the axis determine, to a large degree, the type of tick labels
405 plotted. When set to '<code>HOURS</code>', it means that hours, days, months and
406 years may appear on the axis tick labels. When set to '<code>DAYS</code>', it
407 means that days, months and years may appear. If set to '<code>MONTHS</code>',
408 only years and months may appear and, If <parameter>AXIS_DATE_UNITS</parameter>
409 is set to '<code>YEARS</code>', only years may appear. Note that 'day'
410 labels consist of the day of the week and the number of the day in the month.</para>
411 </section>
412
413
414 <section id="Axis_Tick_Labels">
415 <title>Tick Labels</title>
416
417 <para>The user may also decide to plot any combination of tick labels, i.e. year,
418 month, day/date or hour. Parameters exist to enable this, i.e.
419 <parameter>AXIS_HOURS_LABEL</parameter>, <parameter>AXIS_DAYS_LABEL</parameter>,
420 <parameter>AXIS_MONTHS_LABEL</parameter> and <parameter>AXIS_YEARS_LABEL</parameter>.
421 These parameters may be set to '<code>ON</code>' or '<code>OFF</code>'.
422 The default is '<code>ON</code>', except for <parameter>AXIS_HOURS_LABEL</parameter>
423 which is '<code>OFF</code>'.</para>
424
425
426 <para>Furthermore, the parameter <parameter>AXIS_DAYS_LABEL</parameter> is
427 different to the others as it may be set to '<code>DAY</code>', '<code>NUMBER</code>
428 or '<code>BOTH</code>' as well as '<code>off</code>'. The default for
429 <parameter>AXIS_DAYS_LABEL</parameter> is '<code>BOTH</code>'.</para>
430
431 <para>Parameters exist to control the colour, height and quality of all the
432 label types and, for <code>DAYS</code> and <code>MONTHS</code>, the number of
433 characters in the name may be selected, e.g.
434 <code>SEPTEMBER</code>, <code>SEP</code> or <code>S</code>. <!-- A full list of the
435 date/time parameters is in appendix 1. --></para>
436 </section>
437
438 <section id="Axis_Axis_Grids">
439 <title>Axis Grids</title>
440
441 <para>For date/time axes only, axis grids may be positioned by the user, i.e.
442 grids may be drawn in positions other than the tick positions. To achieve this,
443 the parameter <parameter>AXIS_DATE_GRID_POSITIONING</parameter> should be set to
444 '<code>POSITIONAL</code>', the default being '<code>AUTOMATIC</code>'. A
445 list of positions for placing the grids should be passed using the parameter
446 <parameter>AXIS_DATE_GRID_POSITION</parameter> LIST, e.g.</para>
447
448 <programlisting> CALL <function>PSET1C</function> ('<parameter>AXIS_DATE_GRID_POSITION_LIST</parameter>',GLIS,N)</programlisting>
449
450 <para>where <code>N</code> is the number of positions and <code>GLIS</code> is
451 an array containing the positions which should be in the same format as
452 <parameter>AXIS_DATE_MIN_VALUE</parameter> and <parameter>AXIS_DATE_MAX_VALUE</parameter>
453 described above.</para>
454 </section>
455
456
457 <section id="Axis_Curve_Plotting">
458 <title>Curve Plotting</title>
459
460 <para>Please note that, when using a date/time axis, the X axis units used for
461 plotting graphs (curves and bar charts) will have the format
462 <code>YYYY-MM-DD HH:mm:ss</code> as described above.</para>
463 </section>
464
465
466 </section> <!-- id="Axis_Date_Time" -->
467
468
469
470 <xi:include href="../paramtables/paxis_tables.xml"
471 xmlns:xi="http://www.w3.org/2001/XInclude" />
472
473 <!--
474 <xi:include href="../paramtables/Axis_horizontal_axis_magml_tables.xml"
475 xmlns:xi="http://www.w3.org/2001/XInclude" />
476 -->
477 <xi:include href="../paramtables/Axis_horizontal_axis_magml_flat_tables.xml"
478 xmlns:xi="http://www.w3.org/2001/XInclude" />
479 <!--
480 <xi:include href="../paramtables/Axis_vertical_axis_magml_tables.xml"
481 xmlns:xi="http://www.w3.org/2001/XInclude" />
482 -->
483 <xi:include href="../paramtables/Axis_vertical_axis_magml_flat_tables.xml"
484 xmlns:xi="http://www.w3.org/2001/XInclude" />
485
486 <section id="Python_Axis_Examples">
487 <title>Axis examples using Python</title>
488
489 <para>The following example shows how to use a simple date axis in a Python program.</para>
490
491 <programlisting>
492 <xi:include href="../examples/manual/python/source/axis_python.py_cc" xmlns:xi="http://www.w3.org/2001/XInclude" />
493 </programlisting>
494
495 <figure id="figure_axis_py1Plot">
496 <title>Resultant plot from example Python axis program</title>
497
498 <mediaobject id="axis_pyPlot">
499 <imageobject role="html">
500 <imagedata fileref="images/python/axis_python_01.png" format="PNG" />
501 </imageobject>
502
503 <imageobject role="fo">
504 <imagedata fileref="../examples/manual/python/png/axis_python_01.png" format="PNG" depth="11cm"/>
505 </imageobject>
506 </mediaobject>
507 </figure>
508
509 <para>The next example shows how to generate the same simple date axis with the MagMacro module in Python.</para>
510
511 <programlisting>
512 <xi:include href="../examples/manual/python/source/axis_magmacro.py_cc" xmlns:xi="http://www.w3.org/2001/XInclude" />
513 </programlisting>
514
515 <figure id="figure_axis_magmacro_py1Plot">
516 <title>Resultant plot from example Python axis program</title>
517
518 <mediaobject id="axis_magmacro_py1Plot">
519 <imageobject role="html">
520 <imagedata fileref="images/python/axis_magmacro_01.png" format="PNG" />
521 </imageobject>
522
523 <imageobject role="fo">
524 <imagedata fileref="../examples/manual/python/png/axis_magmacro_01.png" format="PNG" depth="11cm"/>
525 </imageobject>
526 </mediaobject>
527 </figure>
528 </section>
529
530
531 </chapter>