NAME

cxGeoPlotLegendAdd - adds a legend to the current plot

C SPECIFICATION

#include <cx/Geometry.h>

cxErrorCode cxGeoPlotLegendAdd (float *start, float *end, char *title)

PARAMETERS

start
An array of two floating point numbers (interpreted as (x,y) coordinates), defining the bottom left-hand corner of the legend.
end
An array of two floating point numbers (interpreted as (x,y) coordinates), defining the top right-hand corner of the legend.
title
A string which is used as the caption for the legend.

FUNCTION RETURN VALUE

cxGeoPlotLegendAdd returns an error code, an enumerated integer with cx_err_none (zero) indicating success. Any other value indicates the absence of a prior call to cxGeoPlotBegin, or an attempt to add a legend to a plot which has no datasets. A description of the error can be obtained by immediately calling cxGeoPlotGetLastError (3E).

DESCRIPTION

This function adds a legend to the current plot, located at (start, end). Here, the coordinates of the legend are in the same units as the coordinates specifying the location of the plot (which are set by cxGeoPlotDefine).

The legend contains an entry for all of the datasets that have been added to the current plot prior to the call of this function. The legend uses the plotting style for each dataset, together with the string identifying each one (all of which are set using cxGeoPlotDataAdd* routines). The caption of the legend (placed at the top of the legend area) is set using the title string.

SEE ALSO

cxGeoPlotDefine (3E)

The source of the LineGraph module may be found at $EXPLORERHOME/src/LineGraph/linegraph.c (UNIX) and %EXPLORERHOME%\src\LineGraph\linegraph.c (NT). It illustrates the use of many of the cxGeoPlot* routines.


Last modified: Aug 04 14:56 1999
[
Documentation Home ]

© The Numerical Algorithms Group Ltd, Oxford UK. 1999