NAME

cxGeoPlotDataOptionSet - use an integer to set an attribute of the current dataset to be plotted

#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 cxGeoPlotOptionSet (cxGeoDataSetting type, int val)
type
The attribute of the current dataset to be set.
val
An integer value to be used to set the attribute.

cxGeoPlotOptionSet 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, or the absence of any datasets on the plot. A description of the error can be obtained by immediately calling cxGeoPlotGetLastError.

This function sets an attribute of the current dataset using an integer value. The current dataset is the most recently added, or it may be selected with cxGeoPlotDataFocusSet. The predefined values FALSE (0) and TRUE (1) are recognised by this function. Meaningful results will only be obtained for those attributes that require an integer value. These are listed in the following sections.


CX_GEO_DATA_LSTYLE

- controls style of dataset's curve on the plot

These attributes control the appearance of curve which is drawn through the dataset's points on the plot. val can be one of:

CX_GEO_DATA_POLYLINE - straight lines connecting the points are drawn
CX_GEO_DATA_CURVE - a smooth curve through the points is drawn
CX_GEO_DATA_NOLINE - no line is drawn
CX_GEO_DATA_STAIRS - the points are connected in a staircase

For the staircase connecting points (X1, Y1) and (X2, Y2), a horiziontal line is drawn between (X1, Y1) and (X2, Y1), followed by a vertical line from (X2, Y1) to (X2, Y2). By default, straight lines connecting the points are drawn.


CX_GEO_DATA_MARKERS - visibility of markers at the dataset's points

This attribute controls whether a marker is drawn at each of the dataset's points on the plot. val can be one of:

FALSE - markers not drawn
TRUE - markers are drawn

By default, markers are not drawn.


CX_GEO_DATA_FILLED - controls whether dataset's curve is filled

This attribute controls whether the curve drawn through the dataset's points is filled. The region between a horizontal line drawn at CX_GEO_DATA_FILL_VALUE (set via cxGeoPlotDataFloatSet) and the curve will be filled in if this option is switched on. val can be one of:

FALSE - curve is not filled
TRUE - curve is filled

By default, the curve is not filled.


CX_GEO_DATA_LINE _PATTERN - line pattern used for the dataset's curve on the plot

For this attribute, val specifies the stipple pattern for the line when it is drawn. The value can vary from 0 (invisible line) through 0x0f0f (dotted line) and 0x00ff (dashed line) to 0xffff(solid line). The default pattern is 0xffff (solid).

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

cxGeoPlotBegin cxGeoPlotGetLastError cxGeoPlotDataFocusSet cxGeoPlotDataFloatSet

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


[ Documentation Home ]