NAME

cxGeoPlotDataFloatSet - use a float to set an attribute of the current dataset to be plotted

C SPECIFICATION

#include <cx/Geometry.h>

enum cxGeoDataSetting
{
 CX_GEO_DATA_LSTYLE,
 CX_GEO_DATA_MARKERS,
 CX_GEO_DATA_LINE_COLOR,
 CX_GEO_DATA_LINE_PATTERN,
 CX_GEO_DATA_LINE_WIDTH,
 CX_GEO_DATA_MARKER_COLOR,
 CX_GEO_DATA_FILLED,
 CX_GEO_DATA_LABEL,
 CX_GEO_DATA_FILL_COLOR,
 CX_GEO_DATA_FILL_VALUE,
};

cxErrorCode cxGeoPlotDataFloatSet (cxGeoDataSetting type, float val)

PARAMETERS

type
The attribute of the current dataset to be set.
val
A floating-point value to be used to set the attribute.

FUNCTION RETURN VALUE

cxGeoPlotDataFloatSet returns an error code, an enumerated integer with cx_err_none (zero) indicating success. Any other value indicates an improper input (see below) the absence of a prior call to cxGeoPlotBegin (3E), or the absence of any datasets on the plot. A description of the error can be obtained by immediately calling cxGeoPlotGetLastError (3E).

DESCRIPTION

This function sets an attribute of the current dataset using a floating-point value. The current dataset is the most recently added, or it may be selected with cxGeoPlotDataFocusSet (3E). Meaningful results will only be obtained for those attributes that require a float value. These are listed in the following sections.


CX_GEO_DATA_LINE_WIDTH

- the line width for the dataset's curve on the plot

For this attribute, val is converted to an integer, and used as width of the line, in number of pixels. The default line width is 1.0.


CX_GEO_DATA_FILL_VALUE

- the Y value used to fill the curve

For this attribute, val is used to draw a horizontal line across the plot at Y = val. The area between the line and the dataset's curve is then filled using the current fill color (this may be set with cxGeoPlotDataColorSet (3E)).

Attempting to set other attributes using this function will generate an error..

SEE ALSO

cxGeoPlotBegin (3E), cxGeoPlotGetLastError (3E) cxGeoPlotDataFocusSet (3E), cxGeoPlotDataColorSet (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:57 1999
[
Documentation Home ]

© The Numerical Algorithms Group Ltd, Oxford UK. 1999