Modify R Graphics in CRAN Contributed Packages

I like using the R package qcc. This is a great package for the quality control professional. The package generates a lot of cool graphics. I know how to modify basic graphs in R with the par() command.

The graphics in the qcc package are somewhat unique and I don't always know what elements make up the graphics. How do I determine what elements make up the graphics so I can modify them with the par() commands and arguments. Take this simple cause and effect diagram in the code below. How would I go about modifying line colors, line thicknesses, font, etc? I have no idea how the author constructed this when they developed the package.

library(qcc)
cause.and.effect(cause=list(Measurements=c("Micrometers", "Microscopes",    "Inspectors"),
Materials=c("Alloys", "Lubricants", "Suppliers"),
Personnel=c("Shifts", "Supervisors", "Training", "Operators"),
Environment=c("Condensation", "Moisture"),
Methods=c("Brake", "Engager", "Angle"),
Machines=c("Speed", "Lathes", "Bits", "Sockets")),
effect="Surface Flaws")

The following capability analysis should be a little more familiar to the normal R user. How do I modify the three vertical red lines in this graphic? Perhaps I want to use a different color, different line style/thickness, etc. And again, how do I determine what elements make up the graphic so I can modify any particular part of it if I so wish?

library(qcc)
data(pistonrings)
attach(pistonrings)
diameter <- qcc.groups(diameter, sample)
q <- qcc(diameter[1:25,], type="xbar", nsigmas=3, plot=FALSE)
process.capability(q, spec.limits=c(73.95,74.05))
链接地址: http://www.djcxy.com/p/25034.html

上一篇: 如何查看R .Internal或.Primitive函数的源代码?

下一篇: 修改CRAN Contributed软件包中的R图形