MSQC::mult.chart ignores xlim argument
I computed Hotelling T2 on a normalized dataset and obtained the following chart in R:
In the chart, I want to study the interval 50100 in the Xaxis closely. Is there any function or method in R through which this can be done? Thanks.
1 answer

Unfortunately,
MSQC::mult.chart
does not supportxlim
argument. But you can extract the values to plot and reproduce manually. See example below.library(MSQC) data(dowel1) # default mult.chart(dowel1, type = "chi", alpha = 0.05) #> [[1]] #> [1] "Chisquared Control Chart" #> #> $ucl #> [1] 5.99 #> #> $t2 #> [,1] #> [1,] 1.62 #> ... #> #> $Xmv #> [1] 0.5 1.0 #> #> $covariance #> [,1] [,2] #> [1,] 4.9e05 8.6e05 #> [2,] 8.6e05 4.2e04
# manual mc < mult.chart(dowel1, type = "chi", alpha = 0.05) plot(seq_along(mc$t2), mc$t2, ylim = c(0, mc$ucl), type = "l") points(seq_along(mc$t2), mc$t2) abline(h = mc$ucl, col = 2)
# restricted plot(seq_along(mc$t2), mc$t2, ylim = c(0, mc$ucl), type = "l", xlim = c(5, 20)) points(seq_along(mc$t2), mc$t2) abline(h = mc$ucl, col = 2)
^{Created on 20190210 by the reprex package (v0.2.1)}