You are here: Symbol Reference > StatControlCharts Namespace > Functions > StatControlCharts.QCPChart Function
Stats Master VCL
ContentsIndex
PreviousUpNext
StatControlCharts.QCPChart Function

In this case each sample can have different size. You must store sizes in SampleSize vector.

Pascal
procedure QCPChart(const Data: TVec; const SampleSize: TVec; const DrawVec: TVec; out CL: double; const UCL: TVec; const LCL: TVec; Confidence: double = 0.997); overload;
Parameters 
Description 
Data 
Data to be analyzed. Each value represents number of defects. 
SampleSize 
Sample size. Can be integer or vector. 
DrawVec 
Returns values to be drawn. 
CL 
Returns control Chart centerline. 
UCL 
Returns control Chart upper control limit. 
LCL 
Returns control Chart lower control limit. 
Confidence 
Confidence level for upper and lower control limit. Confidence must lie in the (0,1) interval. 

An exeption is raised if Data and SampleSize length do not match.

TQCSeries, Dew.Stats.Tee.QCSeries, QCNPChart, QCUChart, QCCChart

The following code will create P chart:

Uses StatControlCharts, MtxExp, Math387, MtxVecTee, StatSeries;
procedure Example(Series1: TQCSeries);
var CL, UCL, LCL : double;
  Data: Matrix;
  DrawVec: Vector;
begin
  Data.LoadFromFile('data.mtx');
  QCPChart(Data,10, DrawVec,CL,UCL,LCL,0.05);
  // setup limit lines
  Series1.UCL := UCL;
  Series1.LCL := LCL;
  Series1.CL := CL;
  // now draw actual data
  DrawValues(DrawVec,Series1);
end;
#include "StatSeries.hpp"
#include "MtxVecTee.hpp"
#include "MtxExpr.hpp"
#include "StatControlCharts.hpp"
#include "Math387.hpp"
void __fastcall Example(TQCSeries* Series1)
{
  sVector DrawVec;
    sVector Data;
  double cl,lcl,ucl;

  QCPChart(Data,10, DrawVec,cl,ucl,lcl,0.05);
  // Setup series properties
  Series1->UCL = ucl;
  Series1->LCL = lcl;
  Series1->CL = cl;
  DrawValues(DrawVec,Series1,0,1,false);
}
Examples on GitHub
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!