Defines an oblique axis for high-resolution graphics.
||Whether to reset the axis definition to the default values (
||Name to be used inside Genstat to identify each axis|
||Title for each axis|
||Position of title (
||Direction of title (
||Lower bound for each axis|
||Upper bound for each axis|
||Distance between each tick mark (scalar) or positions of the marks along each axis (variate)|
||Positioning of the tick marks on each axis (
||Labels at each major tick mark|
||Position of the axis labels (
||Direction of the axis labels (
||Rotation of the axis labels|
||Number of subticks per interval (ignored if
||Position of the axis origin in the x-dimension|
||Position of the axis origin in the y-dimension|
||Position of the axis origin in the z-dimension|
||Step in the x-direction corresponding to a step of length one along the axis|
||Step in the y-direction corresponding to a step of length one along the axis|
||Step in the z-direction corresponding to a step of length one along the axis|
||Pen to use to write the axis title|
||Pen to use to draw the axis|
||Pen to use to write the axis labels|
||Whether the axis should have an arrowhead (
||Whether to display or hide the axis (
||Transformed scale for the axis marks and labels (
||Number of decimal places to use for numbers printed at the marks|
||Format to use for dates and times printed at the marks|
||Format to use for numbers printed at the marks|
||Saves details of the current settings for the axis concerned|
AXIS directive allows you to define an oblique axis for high-resolution graphics. You use the
IDENTIFIER parameter to supply an identifier to store the axis definition. You can then use this as a setting of the
AXES parameter of the
FRAME directive to display the axis in a particular graphics window. The other parameters define particular attributes of the axis. Any that are not set in a particular
AXIS statement retain their existing settings. These may be the initial default settings, which are the same as those of other (x-, y- or z-) axes, or they may have been defined by an earlier
AXIS statement with the same axis identifier. Alternatively, you can set option
RESET=yes to reset the values back to the initial default values.
The position of the axis origin in the x-, y- and z-dimensions of the window is specified by the parameters
ZZERO, respectively. The
ZSTEP parameters define the size of the steps in the x-, y- and z-directions that corresponds to a step of length one along the axis. These six parameters thus define the location and direction of the axis.
You can specify a title for the axis using the
TITLE parameter. This is limited to a single line of characters. The
TPOSITION parameter controls whether the title is placed in the middle or at the end of the axis, and the
TDIRECTION parameter controls whether it is written parallel or perpendicular to the axis.
The axis is marked with a scale, determined automatically so that tick marks are evenly spaced and positioned to give “round” numbers for the scale values. You can set the
MARKS parameter to a scalar to define the increment between tick marks. For example, setting
MARKS=1.5 with bounds 10 and 2, causes tick marks to appear at 2, 3.5, 5, 6.5, 8 and 9.5. The interval must be a positive number, irrespective of the values of the bounds. Alternatively, you can set
MARKS to a variate (with more than one value) to specify the actual positions of the tick marks on the axis. Any values that lie outside the axis bounds are ignored. The scale values printed next to the tick marks use a format that is determined automatically from the values, but if you set
MARKS to a variate it will use the number of decimals specified in the variate declaration. If
MARKS is unset or set to a scalar, you can use the
NSUBTICKS parameter to specify a number of “subticks” to be drawn between each of the (major) tick marks.
TEXT [VALUES=Mon,Tues,Wed,Thur,Fri,Sat,Sun] Day
VARIATE [VALUES=1...31] Month
AXIS Timeax; MARKS=Month; LABELS=Day
The strings within the text are cycled if necessary, so the number of strings can be less than the number of tick marks. The
DECIMALS parameter can set the number of decimal places to use if you are printing numbers at the marks. If the numbers represent dates or times, you should specify their formats using the
DREPRESENTATION parameter (see the
VREPRESENTATION=scientific; numbers are then printed as a decimal number with absolute value less than 10, followed by an exponent (e.g. 3.4567 E4 for 34567). Alternatively, you can set
VREPRESENTATION=engineering to use engineering format; the decimal number then has an absolute value less than 10000, so the exponent is a multiple of 3 (e.g. 34.567 E3 for 34567). With scientific or engineering formats, the
DECIMALS parameter sets the number of significant figures to use rather than the number of decimal places.
MPOSITION parameter controls the positioning of the tick marks, which can be drawn on the inside or the outside of the axis, or can be drawn across the axis. With the
outside setting, the tick marks are drawn towards the outside of the plot; that is below the axis if the axis is in the lower half of the plot, or above the axis if it is in the top half of the plot. The aim is then to position the tick marks away from the main part of the plot, so that they interfere with the plotted points as little as possible. With the
inside setting, the marks are drawn on the opposite side (that is, to the inside of the plot), while the
across setting draws them across the axis. Similarly, the positioning of the scale markings or labels is controlled by the
LPOSITION parameter, with settings
LDIRECTION parameter controls whether the scale markings or labels are written parallel or perpendicular to the axis. Alternatively, you can use the
LROTATION parameter to specify the direction of the labels more precisely, as a rotation in degrees from the horizontal (i.e. parallel) direction. If
LROTATION is specified, any setting of
LDIRECTION is ignored.
MARKS=* will return to the default positioning of the tick marks. Setting
LABELS=* will switch off any labels previously specified. Setting
MPOSITION=* will switch off any tick marks, and setting
LDIRECTION=* will switch off any labels.
TRANSFORM parameter allows you to transform the marks and labels on the axis. The location and direction of the axis are defined according to the original scale, by the
ZSTEP parameters, as usual. The coordinates along the axis are then transformed, and labelled according to the transformed scale. So, for example, with
TRANSFORM=log10, the original coordinates 1, 10 and 100 would be labelled 0, 1 and 2. The settings are the same as the names of the equivalent Genstat functions, with the addition of
exp10 for the antilog transformation (i.e. 10x),
and square for x2.
There are three parameters to control the pens to be used to draw the axis. These are
PENLABEL, specifying the pen for the title, the axis and the labelling, respectively. The initial default is to use pens -1, -2 and -3 as for other axes.
ARROWHEAD parameter controls whether the axis is drawn with an arrowhead at the end. The
ACTION parameter controls whether or not the axis is displayed or hidden initially when the window is used for a plot (you can then choose to display the axis from within the graphics viewer).
The current settings defined for the axis can be saved in a pointer supplied by the
SAVE parameter. The elements of the pointer are labelled to identify the components.
Commands for: Graphics.
" AXIS example - plot a 30/60/90 set square " AXIS lower; LOWER=0; UPPER=2; MARKS=0.5; XZERO=1; YZERO=1;\ XSTEP=1; YSTEP=0 AXIS oblique; LOWER=0; UPPER=4; MARKS=0.5; MPOSITION=inside;\ LPOSITION=inside; XZERO=1; YZERO=1; XSTEP=COS(RADIANS(60));\ YSTEP=SIN(RADIANS(60)) AXIS upper; LOWER=0; UPPER=SQRT(16-4); MARKS=0.5; XZERO=3; YZERO=1;\ XSTEP=0; YSTEP=1 XAXIS 1; LOWER=0; UPPER=5 YAXIS 1; LOWER=0; UPPER=5 FRAME 1; AXES=!p(lower,oblique,upper) DGRAPH [KEY=0] 1; 1