Normal probability plot

Create a normal probability plot

Function demo()
    Variable numPts = 100
    Make/o/n=(numPts) data
    data = 10 + gnoise(1)
    statsNormPlot(data)
End

//==========================================================================================
// The following function produces a normal probability plot equivalent to plotting
// on Gaussian probability paper. based on a modification of statsProbPlot()
Function/S statsNormPlot(inWave)
    Wave inWave
   
    String outWinName=""
    Duplicate/O inWave,tmpWave,xWave
    Sort tmpWave,tmpWave
    Variable num=numpnts(inWave)
    xWave=(p-0.3175)/(num+0.365)
    xWave=StatsInvNormalCDF(xWave,0,1)
    Variable/G V_fitOptions=4
    CurveFit/Q line xWave /X=tmpWave /D
    Wave fit_xWave
    Display/K=1 /W=(5,45,470,405)  xWave vs tmpWave
    outWinName=UniqueName("WM_PROB_PLOT",6,0)
    DoWindow/C $outWinName
    AppendToGraph fit_xWave
    ModifyGraph mode(xWave)=4, lstyle(fit_xWave)=2, rgb(fit_xWave)=(0,0,0)
    TextBox/N=text0/F=0/A=MC/X=-26.90/Y=47.62 "Normal Probability plot"
    Make/O ticVal = {0.0001, 0.001, 0.003, 0.01, 0.02, 0.05, 0.10, 0.25, 0.50, 0.75, 0.90, 0.95, 0.98, 0.99, 0.997, 0.999, 0.9999}
    Make/O/T ticStr = {"0.0001", "0.001", "0.003", "0.01", "0.02", "0.05", "0.10", "0.25", "0.50", "0.75", "0.90", "0.95", "0.98", "0.99", "0.997", "0.999", "0.9999"}
    Duplicate/O ticVal ticLoc
    ticLoc = StatsInvNormalCDF(ticVal[p],0,1)
    ModifyGraph userticks(left)={ticLoc,ticStr}
    Label bottom "Data Values"
    Label left "Probability"

    return outWinName
End

 

Forum

Support

Gallery

Igor Pro 9

Learn More

Igor XOP Toolkit

Learn More

Igor NIDAQ Tools MX

Learn More