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)
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 (3E). A description of the error can be obtained by immediately calling cxGeoPlotGetLastError (3E).
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 (3E), 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 (3E), cxGeoPlotGetLastError (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:52 1999
[ Documentation Home ]