luca-scr / qcc

An R package for Quality Control Charts
https://luca-scr.github.io/qcc/
41 stars 17 forks source link

Spec limits on xbar charts #24

Closed Nilafhiosagam closed 3 years ago

Nilafhiosagam commented 3 years ago

Hi

Is it possible to include predefined spec limit lines on xbar charts along with control limits?

Thanks

luca-scr commented 3 years ago

You can use code similar to the following

library(qcc) # ver >= 3.0
data(pistonrings)
diameter <- qccGroups(diameter, sample, data = pistonrings)
q = qcc(diameter[1:25,], type="xbar")
plot(q, ylim = c(73.95, 74.05), restore.par = FALSE)
abline(h = c(73.98, 74.03), lty = 2, col = 2) # add spec limits