How change qcc u chart label from Calibration data and New data to Old and New?

187 Views Asked by At

enter image description here

Is there any way to change those two labels to "Old" and "New"?

Here is sample code:

dat <- data.frame(id = c(1:10), num = sample(1:10), den = c(11:20))
qcc::qcc(data = dat$num[1:5], sizes = dat$den[1:5],
         newdata = dat$num[6:10], newsizes = dat$den[6:10],
         type = "u", plot = T, data.name = "Old", newdata.name = "New")
1

There are 1 best solutions below

2
On

I don't think there is a straight forward way to change those texts since it is harcoded with mtext in the code.

mtext returns NULL value so you there is nothing that you can change there either.

One option would be to copy the entire source code of qcc function and create your own version of the function. Change those lines with text of your choice or make it variable and pass it as an argument to the function which you can change on the fly.