NAME

cxGeoPlotFloatSet - set an attribute of the current plot using a float

#include <cx/Geometry.h>

enum cxGeoPlotSetting
{
 CX_GEO_PLOT_AXIS_COLOR,
 CX_GEO_PLOT_GRID_COLOR,
 CX_GEO_PLOT_GRID_PATTERN,
 CX_GEO_PLOT_GRID_LINE_WIDTH,
 CX_GEO_PLOT_AXIS_LINE_WIDTH,
 CX_GEO_PLOT_XAXIS_LABEL,
 CX_GEO_PLOT_YAXIS_LABEL,
 CX_GEO_PLOT_XMARGIN,
 CX_GEO_PLOT_YMARGIN,
 CX_GEO_PLOT_XMIN,
 CX_GEO_PLOT_XMAX,
 CX_GEO_PLOT_YMIN,
 CX_GEO_PLOT_YMAX,
 CX_GEO_PLOT_XGRID_VISIBLE,
 CX_GEO_PLOT_YGRID_VISIBLE,
 CX_GEO_PLOT_XAXIS_TYPE,
 CX_GEO_PLOT_YAXIS_TYPE,
 CX_GEO_PLOT_XAXIS_ARROW,
 CX_GEO_PLOT_YAXIS_ARROW,
 CX_GEO_PLOT_XAXIS_INVERSE_TICKS,
 CX_GEO_PLOT_YAXIS_INVERSE_TICKS,
 CX_GEO_PLOT_XAXIS_LABEL_CENTRE,
 CX_GEO_PLOT_YAXIS_LABEL_CENTRE,
 CX_GEO_PLOT_XAXIS_SCALE,
 CX_GEO_PLOT_YAXIS_SCALE,
 CX_GEO_PLOT_LEGEND_BORDER_COLOR,
 CX_GEO_PLOT_LEGEND_BACK_COLOR,
 CX_GEO_PLOT_LEGEND_TEXT_COLOR,
};

cxErrorCode cxGeoPlotFloatSet (cxGeoPlotSetting type, float val)
type
The attribute of the current plot to be set.
val
A floating-point value to be used to set the attribute.

cxGeoPlotFloatSet returns a pointer to an error code. This is an enumerated integer with cx_err_none (zero) indicating success. Any other value indicates an improper input (see below) or the absence of a prior call to cxGeoPlotBegin. A description of the error can be obtained by immediately calling cxGeoPlotGetLastError.

This function sets an attribute of the current plot using a floating-point value. Meaningful results will only be obtained for those attributes that require a float value. These are listed in the following sections.


CX_GEO_PLOT_GRID_LINE_WIDTH - the line width for the plot's grid (if present)
CX_GEO_PLOT_AXIS_LINE_WIDTH - the line width for the plot's axes (if present)

For these attributes, 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_PLOT_XMARGIN - the X margin for the plot
CX_GEO_PLOT_YMARGIN - the Y margin for the plot

For these attributes, val is used to scale and shift the plot in the plotting area by a relative amount. Margin values less than 0.0 or greater than 1.0 are ignored. The default margin value is 0.0.


CX_GEO_PLOT_XMIN - the minimum value for the X axis
CX_GEO_PLOT_XMAX - the maximum value for the X axis
CX_GEO_PLOT_YMIN - the minimum value for the Y axis
CX_GEO_PLOT_YMAX - the maximum value for the Y axis

For these attributes, val is used as the limit of the appropriate axis, in the same units as the data being plotted. If any of these attributes are not set by this function, the appropriate limit is calculated from the data in the call to cxGeoPlotDataAdd, and used as that attribute. By default, all of these attributes will be calculated from data.


CX_GEO_PLOT_XAXIS_SCALE - scaling parameter for labels on the X axis
CX_GEO_PLOT_YAXIS_SCALE - scaling parameter for labels on the Y axis

For these attributes, val is used to scale the labels (tick marks and captions) on the appropriate axis. The default scaling parameter is 1.0.

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

cxGeoPlotBegin cxGeoPlotGetLastError

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 Windows machines. It illustrates the use of many of the cxGeoPlot* routines.


[ Documentation Home ]