Some aspects of a graph's appearance such as the colour of a curve or
the colour of the bars in a histogram can be changed when you call the
CCATSL routine. Another set of simple customisations is governed by
the AxisModeCT (see
below). Other possible modifications include: changing the ranges
(XRangeCL), the colours
(GAxisColoursCL,
GBrushStyleCL and
GLineColourCL), the line style
(GLineStyleCL), the line `mode'
(GLineModeCL),
the number of
subdivisions of the axes
(XIntervalsCL), the graph
origin (XOriginCL) or the viewing
direction for 3D plots
(XViewPointCL).
AxisModeCTCurveCL for example, take as their last
argument a variable of type
AxisModeCT. This must be one of PRESET,
RESCALE, DRAWAXES and AUTOAXES.
The most useful is AUTOAXES,
which asks CCATSL to work out several things, such as sensible
scales for the axes, and good places for the pip marks (small lines on
the axes) and pip labels (small numbers appearing next to the pip
marks). CCATSL then draws the axes, pip marks, pip labels, axes labels
(which by default are blank) and finally the graph itself, all in the current
graphics window.
If you would like CCATSL to work out scales for the axes as usual, but
only to draw the curve, and none of the axes, pip
marks, pip labels or axes labels, you use RESCALE.
If you are trying to draw a graph on the same set of axes as a previous
graph (so you already have the axes, pip marks, pip labels and axes
labels drawn and you don't want the scales recalculated), you use
PRESET, which just draws the curve.
If you want to specify your own ranges for the
,
or
-axes
(perhaps you are only interested in a small part of the graph) you can
use XRangeCL,
YRangeCL and
ZRangeCL to change the scales.
You now don't want CCATSL to recalculate the ranges, but you do want
the axes etc. drawn. In this case, you use DRAWAXES.
XRangeCL, YRangeCL and ZRangeCL
These routines allow you to change the range of values plotted on the
,
and
axes.
They all have the same syntax so we will just describe XRangeCL below.
| void XRangeCL ( |
double l, |
| double h); |
|
| l, h |
Specifies the new |
XOriginCL, YOriginCL and ZOriginCL
These routines allow you to change the origin of the subsequent graphs
(i.e. the point where the axes cross). They all have similar declarations
so we will just describe XOriginCL below.
| void XOriginCL ( |
double x); |
| x |
The new |
XIntervalsCL, YIntervalsCL and ZIntervalsCL
These routines allow you to change the number of intervals into which
each axis is subdivided. They all have similar declarations
so we will just describe XIntervalsCL below.
| void XIntervalsCL ( |
int n); |
| n |
The new number of subdivisions for the axis. |
ViewPointCL
ViewPointCL changes the point from which 3D
perspective plots are viewed.
| void ViewPointCL ( |
double theta, |
| double phi); |
|
| theta |
The new (Eulerian) angle |
|
| phi |
The new (Eulerian) angle |
GAxisColoursCL
| void GAxisColoursCL ( |
ColourCT pipclr, |
| ColourCT axisclr, |
|
| ColourCT labelclr); |
|
| pipclr |
The colour for the pip marks. | |
| axisclr |
The colour for the axes. | |
| labelclr |
The colour for the axis labels. |
GLineColourCLXYSymbolCL,
GGridCL and GBoxCL).
| void GLineColourCL ( |
ColourCT clr); |
| clr |
The new graphics colour. |
GLineStyleCLThis routine changes the style and width of lines produced by graphics routines.
| void GLineStyleCL ( |
LineStyleCT style, |
| int width); |
|
| style |
Possible values are SOLID_LINE, DASH_LINE,
DOT_LINE, DASHDOT_LINE, DASHDOTDOT_LINE, and NULL_LINE. |
|
| width |
The thickness of the pen, in pixels. |
GLineModeCLThis routine changes the way new lines appear when they cross existing lines.
| void GLineModeCL ( |
LineModeCT n); |
| n |
The new line mode, one of NORMAL_MODE, INVERT_MODE, EOR_MODE,
OR_MODE or AND_MODE. |
GBrushStyleCL
This routine changes the colour and style of the brush used in fill operations
such as XYPolygonFillCL.
| void GBrushCL ( |
ColourCT clr, |
| BrushStyleCT k); |
|
| clr |
The new brush colour. | |
| k |
See here for a list of available brush styles. |