next up previous contents index
Next: Drawing graphs line by Up: Customising your graph Previous: Changing its appearance   Contents   Index


Graph Decorations

Although CCATSL draws axis labels, they are blank by default. They may be changed with a call to XAxisLabelCL. (Note that calls to WCurrentCL, and the act of opening the default graph window clear the axis labels.)

You can also mark an arbitrary point in a graph in various ways: with text, using XYLabelCL (or with XYZLabelCL for 3D plots), with one of the standard plotting symbols using XYSymbolCL (or XYZSymbolCL), or by cross-wires, with XYCrossWiresCL (or with XYZCrossWiresCL). Textual labels can also be added interactively, using GLabelCL

You can also add several other pieces of extra visual information which may make your graph more informative with GBoxCL, GBorderCL and GGridCL.


XAxisLabelCL, YAxisLabelCL and ZAxisLabelCL

These routines let you change the strings used to label the axes (they are blank by default). They all have a similar declaration so we will just describe XAxisLabelCL below.

  void XAxisLabelCL ( char *s);

  s The string to use as the axis label.


GBoxCL, GBorderCL and GGridCL

These routines add extra visual information to a graph:

  
GBorderCL();     /* Draw a rectangle around the graph                */
GBoxCL();        /* Draw a box the axes                              */
GGridCL();       /* Draw the box and subdivide it into smaller boxes */
Here is an example of the effect of GBoxCL and GGridCL:

.gif

The colour may be changed by an immediately preceding call to GLineColourCL.


GLabelCL

GLabelCL gives the user the opportunity to attach a text string to a graph interactively. To label a graph non-interactively, see XYLabelCL for two-dimensional graphs and XYZLabelCL for 3D graphs.

  
GLabelCL();       /* Give the user the chance to label a graph. */


XYLabelCL

This routine attaches a textual label to a point on a two-dimensional graph. XYLabelCL performs the analogous function for three-dimensional graphs.

  void XYLabelCL ( double x,
  double y,
  char *txt);

  x, y The coordinates of the point to be labelled.
  txt The text of the label.


XYZLabelCL

This routine attaches a textual label to a point on a three-dimensional graph. XYLabelCL performs the analogous function for two-dimensional graphs.

  void XYZLabelXL ( double x,
  double y,
  double z,
  char *txt);

  x, y, z The coordinates of the point to be labelled.
  txt The text of the label.


XYSymbolCL

This routine marks a point on a two-dimensional graph with one of the standard plotting symbols. XYZSymbolCL performs the analogous function for three-dimensional graphs.

  void XYSymbolCL ( double x,
  double y,
  int sym);

  x, y The coordinates of the mark.
  sym The mark, for example sym=XCROSS makes the mark an XCROSS, and similarly for the other plotting symbols.


XYZSymbolCL

This routine marks a point on a three-dimensional graph with one of the standard plotting symbols. XYSymbolCL performs the analogous function for two-dimensional graphs.

  void XYSymbolCL ( double x,
  double y,
  double z,
  int sym);

  x, y, z The coordinates of the mark.
  sym The mark, for example sym=XCROSS makes the mark an XCROSS, and similarly for the other plotting symbols.


XYCrossWiresCL

This routine draws crosswires through a point on a two-dimensional graph. XYZCrossWiresCL performs the analogous function for three-dimensional graphs.

  void XYCrossWiresCL ( double x,
  double y);

  x, y The coordinates of the point.


XYZCrossWiresCL

This routine draws crosswires through a point on a 3D graph. XYCrossWiresCL performs the analogous function for two-dimensional graphs.

  void XYZCrossWiresCL ( double x,
  double y,
  double z);

  x, y, z The coordinates of the point.


next up previous contents index
Next: Drawing graphs line by Up: Customising your graph Previous: Changing its appearance   Contents   Index
CATAM admin 2010-02-23