DataLab is a compact statistics package aiming at exploratory data analysis. Please visit the DataLab Web site for more information....


CreatePlot

Declaration: CreatePlot (PlotIx: integer; var Plot: TFrmPlots): integer;
The function CreatePlot creates and/or opens a new plot window and assigns the window handle to the parameter Plot. The parameter PlotIx can assume values between 0 and 9. If PlotIx is set to zero, the next available plot window is created and opened, if PlotIx is greater than zero a specific plot window is created and/or opened.

The function returns the following error codes:

>0 ... everything is OK, the returned number is the number of the plot window (1 to 9)
-1 ... the plot cannot be generated (too many plot windows open)

Hint: Please note that CreatePlot does not change the window state of an already open plot window. If the plot window is minimized it stays minimized, even if you change its parameters. Use the property WindowState to change the state of the window.

Example: The following code snippet shows how to create a new plot window. The new plot window is switched to displaying a histogram with a particular range.

var
  Plt1 : TFrmPlots;

begin
if CreatePlot (0, Plt1) > 0 then
  begin    // display histograms
  Plt1.WindowState := wsNormal;
  Plt1.PlotParams.KindOfDisp := kdHIsto;
  Plt1.SetRange (0.5, 0, 1.0, 20);
  end;
end;