cxGeoPlotOptionSet - set an attribute of the current plot using a integer
#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, int 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 an integer value. 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_PLOT_XGRID_VISIBLE |
- visibility of grid lines normal to the X axis |
CX_GEO_PLOT_YGRID_VISIBLE |
- visibility of grid lines normal to the Y axis |
These attributes control whether grid lines are drawn. val can be one of:
FALSE |
- grid lines not drawn |
TRUE |
- grid lines are drawn |
By default, grid lines are not drawn.
CX_GEO_PLOT_GRID_PATTERN |
- line pattern used for the plot's grid (if present) |
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).
CX_GEO_PLOT_XAXIS_TYPE |
- controls appearance of X axis |
CX_GEO_PLOT_YAXIS_TYPE |
- controls appearance of Y axis |
These attributes control the appearance of the plot axes. val can be one of:
CX_GEO_PLOT_LINEAR_AXIS |
- the axis is linear |
CX_GEO_PLOT_LOG_AXIS |
- the axis is logarithmic. |
CX_GEO_PLOT_NO_AXIS |
- the axis is not displayed |
If a logarithmic axis is selected, its range is checked, and the function returns an error if any of the limits are non-positive. By default, the axes are linear.
CX_GEO_PLOT_XAXIS_ARROW |
- visibility of arrow at end of X axis |
CX_GEO_PLOT_YAXIS_ARROW |
- visibility of arrow at end of Y axis |
These attributes control whether an arrow is included at the end of the axis. val can be one of
FALSE |
- arrow is not drawn |
TRUE |
- arrow is drawn |
By default, an arrow is not drawn.
CX_GEO_PLOT_XAXIS_INVERSE_TICKS |
- controls position of ticks on X axis |
CX_GEO_PLOT_YAXIS_INVERSE_TICKS |
- controls position of ticks on Y axis |
These attributes control whether the ticks on the axis are drawn on the outside or inside of the plotting area. val can be one of
FALSE |
- ticks are drawn on outside |
TRUE |
- ticks are drawn on inside |
By default, the ticks are drawn on the outside.
CX_GEO_PLOT_XAXIS_LABEL_CENTRE |
- controls position of label on X axis |
CX_GEO_PLOT_YAXIS_LABEL_CENTRE |
- controls position of label on Y axis |
These attributes control whether the label (caption) on the axis is drawn in the centre or at the end of the axis. val can be one of
FALSE |
- label is drawn at end |
TRUE |
- label is drawn in centre |
By default, the label is drawn in the centre of the X axis, and at the end of the Y axis.
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 12:00 1999
[ Documentation Home ]