I assume you are using the qcc package's qcc function. example(qcc) gives an example of adding abline's to its plot: # add warning limits at 2 std. deviations q <- qcc(diameter[1:25,], type="xbar", newdata=diameter[26:40,], plot=FALSE) (warn.limits <- limits.xbar(q$center, q$std.dev, q$sizes, 2)) plot(q, restore.par = FALSE) abline(h = warn.limits, lty = 3, col = "chocolate") and help(qcc) describes the 'restore.par' argument: restore.par: a logical value indicating whether the previous ‘par’ settings must be restored. If you need to add points, lines, etc. to a control chart set this to ‘FALSE’.
Bill Dunlap TIBCO Software wdunlap tibco.com On Mon, Jan 29, 2018 at 3:49 AM, a.antonini...@hotmail.com < a.antonini...@hotmail.com> wrote: > Good morning, > I have some problem adding ablines in Rstudio. > The lines drew by the software doesen’t match with the added values, what > can I do? > > pfaOK<-qcc(D[!trial], sizes=size[!trial], type="p", nsigmas=2, > data.name="Polli > positivi al Campylobacter") > pfaOK1<-qcc(D[!trial], sizes=size[!trial], type="p", data.name="Polli > positivi al Campylobacter") > > abline(h=pfaOK$limits[1], lty=1, col="red") > abline(h=pfaOK$limits[2], lty=1, col="red") > > abline(h=0.02204175, col="red") > abline(h=0.1996249, col="red") > > abline(h=2.204175, col="red") > abline(h=19.96249, col="red") > > Thanks for the attention, > Arianna > > Inviato da Posta<https://go.microsoft.com/fwlink/?LinkId=550986> per > Windows 10 > > > [[alternative HTML version deleted]] > > > ______________________________________________ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/ > posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.