VF_xyAutoPlotVD_xyAutoPlotVE_xyAutoPlot
VI_xyAutoPlotVBI_xyAutoPlotVSI_xyAutoPlot
VLI_xyAutoPlotVQI_xyAutoPlot
VU_xyAutoPlotVUB_xyAutoPlotVUS_xyAutoPlot
VUL_xyAutoPlotVUQ_xyAutoPlotVUI_xyAutoPlot
 ..._xyAutoPlot_xlg_ylin 
 ..._xyAutoPlot_xlg_ylg 
 ..._xyAutoPlot_xlin_ylg 
FunctionDraws a Cartesian coordinate system and plots a Y-vector against an X-vector into it.
Syntax C/C++#include <Vgraph.h>
void VF_xyAutoPlot( fVector X, fVector Y, ui size, unsigned form, COLORREF color );
void VF_xyAutoPlot_xlg_ylin( fVector X, fVector Y, ui size, unsigned form, COLORREF color );
void VF_xyAutoPlot_xlg_ylg( fVector X, fVector Y, ui size, unsigned form, COLORREF color );
void VF_xyAutoPlot_xlin_ylg( fVector X, fVector Y, ui size, unsigned form, COLORREF color );
C++ VecObj#include <OptiVec.h>
void vector<T>::xyAutoPlot( const vector<T>& X, unsigned form, COLORREF color );
void vector<T>::xyAutoPlot_xlg_ylin( const vector<T>& X, unsigned form, COLORREF color );
void vector<T>::xyAutoPlot_xlg_ylg( const vector<T>& X, unsigned form, COLORREF color );
void vector<T>::xyAutoPlot_xlin_ylg( const vector<T>& X, unsigned form, COLORREF color );
Pascal/Delphiuses Vgraph;
procedure VF_xyAutoPlot( X, Y:fVector; size:UIntSize; form:UInt; color:COLORREF );
procedure VF_xyAutoPlot_xlg_ylin( X, Y:fVector; size:UIntSize; form:UInt; color:COLORREF );
procedure VF_xyAutoPlot_xlg_ylg( X, Y:fVector; size:UIntSize; form:UInt; color:COLORREF );
procedure VF_xyAutoPlot_xlin_ylg( X, Y:fVector; size:UIntSize; form:UInt; color:COLORREF );
DescriptionA Cartesian coordinate system is drawn with automatic scaling of the axes and the vector Y is plotted against the vector X. You can choose any combination of linear and logarithmic axes:
VF_xyAutoPlot: both X axis and Y axis linear.
VF_xyAutoPlot_xlg_ylinX axis logarithmic, Y axis linear.
VF_xyAutoPlot_xlg_ylg: both X axis and Y axis logarithmic.
VF_xyAutoPlot_xlin_ylg: X axis linear, Y axis logarithmic.
Prior to calling VF_xyAutoPlot etc., the plotting routines have to be initialized by V_initPlot.
The VecObj version of this function has to be called as a member function of Y (rather than of X).
The font of the axis tick labels is the text font of the current device context.

The style of the plot is determined by the parameter form which should be constructed using the symbolic constants defined in <Vgraph.h> (C/C++) or in the unit Vgraph (Pascal/Delphi).
For the line styles, Borland's old BGI notation is still supported along with the standard Windows notation; the necessary macros for the translation are included in <Vgraph.h> and in the unit Vgraph.

1. Style of lines connecting adjacent data points:
 
Windows styleBGI C/C++BGI Pascalappearance
PS_SOLIDSOLID_LINESolidLn–––– (default)
PS_DOTDOTTED_LINEDottedLn·········
PS_DASHDASHED_LINEDashedLn- - - -
PS_DASHDOTCENTER_LINECenterLn- · - · -
PS_DASHDOTDOT  - · · - · ·
PS_NULLNULL_LINENullLn(no line at all)

2. Symbols used to mark data points:
 
SY_NULL(no symbol at all)   (default)
SY_CROSS
SY_PLUS+
SY_STAR*
SY_CIRCLE
SY_BOX
SY_DIAMOND
SY_TRIANGLEUP
SY_TRIANGLEDOWN

3. Fill-style of the symbols:
 
SY_HOLLOWno filling  (default)
SY_FILLEDfilled
SY_DOTTEDhollow, with a dot at the exact position of the data point

The parameter form has to be constructed by adding the appropriate line style, the symbol and its fill-style, e.g. (SOLID_LINE + SY_TRIANGLEUP). Alternatively, the bit-wise "OR" operation may be used, e.g. (PS_SOLID | SY_CIRCLE | SY_DOTTED ).
In Pascal terms, these examples read:
(SolidLn + SY_TRIANGLEUP), and (PS_SOLID or SY_CIRCLE or SY_DOTTED).

Note that NULL_LINE or PS_NULL has to be explicitly specified, if the data points are not to be connected by lines. Just writing, e.g. (SY_BOX | SY_HOLLOW) would be interpreted as using the default line style, which is SOLID_LINE.

SY_NULL and SY_HOLLOW need not be specified, since these are the default symbol and fill-style, resp. For SY_NULL, SY_CROSS, SY_PLUS, and SY_STAR, the choice of fill-style has no effect.

The parameter color denotes the colour that is to be used for the plot (the data type COLORREF is unsigned long / ULong). The "standard" colors BLACK, BLUE, GREEN, CYAN, RED, MAGENTA, BROWN, LIGHTGRAY, DARKGRAY, LIGHTBLUE, LIGHTGREEN, LIGHTCYAN, LIGHTRED, LIGHTMAGENTA, YELLOW, and WHITE are defined in <Vgraph.h> (or the unit Vgraph) by analogy with the COLORS defined for the old BGI. Nevertheless, it is recommended to use fine-tuned colors defined by the RGB macro, instead of the predefined colors.

The size of the symbols may be modified with the function V_setSymbolSize. The thickness of the lines may be modified using V_setLineThickness.
For examples, see the demo programs VDEMO and FITDEMO.

Error handlingnone
Return valuenone
See alsoVF_xyDataPlot,   VF_yAutoPlot,   VCF_autoPlot,   V_drawAxes,   V_findAxes,   V_setSymbolSize,  chapter 4.12

VectorLib Table of Contents  OptiVec home