我遇到了一个问题,我的图总是在浅灰色的背景上,在LaTeX中看起来很糟糕。我已经使用par(bg=NA)
,par(bg="white")
这是每个人都建议,但是,从字面上什么都不做尝试...当使用qcc(质量控制图)时,R中的灰色背景阴谋
下面的代码:
# install.packages('qcc')
library(qcc)
nonconforming <- c(3, 4, 6, 5, 2, 8, 9, 4, 2, 6, 4, 8, 0, 7, 20, 6, 1, 5, 7)
samplesize <- rep(50, 19)
control <- qcc(nonconforming, type = "p", samplesize, plot = "FALSE")
warn.limits <- limits.p(control$center, control$std.dev, control$sizes, 2)
par(mar = c(5, 3, 1, 3), bg = "blue")
plot(control, restore.par = FALSE, title = "P Chart for Medical Insurance Claims",
xlab = "Day", ylab = "Proportion Defective")
abline(h = warn.limits, lty = 3, col = "blue")
v2 <- c("LWL", "UWL") # the labels for warn.limits
mtext(side = 4, text = v2, at = warn.limits, col = "blue", las = 2)
请尽量提供代码,自给自足用于复制(这里它缺少数据) – HubertL
完成,谢谢你的回复。 – CanofDrink