int DPlot_AddData(int DocNum, int DataType, int NumPts, int Curve, float *array1, float *array2);
int DPlot_AddData8(int DocNum, int DataType, int NumPts, int Curve, double *array1, double *array2);

Parameters
DocNumDocument index for the document that you want to add data to. In general this value will have been returned by a previous call to DPlot_Plot or DPlot_Command with a FileNew command.
DataTypeMust be DATA_XYXY (XY plot), DATA_3DR (contour plot of randomly-spaced 3D points), DATA_3DS (3D scatter plot), or DATA_1D (box-and-whisker plots and dot graphs). These constants are defined in the header files for the various demo programs.
NumPtsNumber of data points to add.
Curve1-based index of the curve (for DATA_XYXY), group (for DATA_1D), or data set (for DATA_3DS) that the new points are associated with. Ignored for DATA_3DR. To generate a new curve, group, or data set, set Curve to 0.
*array1Address of the X array for DATA_XYXY. Not used for other graph types.
*array2Address of the Y array for DATA_XYXY
 
X,Y,Z triplets (in the order x(0),y(0),z(0),x(1),y(1),z(1),... etc.) for DATA_3DR or DATA_3DS
 
Y (amplitude) array for DATA_1D

Return Values
  1 Success
Generic error. For more specific error information use DPlot_SetErrorMode.
-1 Could not start DPlot or DPlot Jr.
-2 Could not initiate a DDE conversation with DPlot on the given document index.
-3 Unsupported DataType.

Remarks
This function, like DPlot_Command with [XY()], [XYXY()], or [XYZ()] commands, may be used in real-time applications. For best results with real-time applications and XY plots, use the ManualScale command to force the plot coordinates to the desired value. Otherwise, DPlot will continually adjust the plot coordinates to fit the incoming data. If the ManualScale command is issued DPlot keeps the extents of the X axis constant, shifting the plot window to the right when necessary.

 

 
Previous Home Next DPlot Home