I wish I could bring you an easiy solution on y axis percentage formatting Though I haven't got a chance to dive deep into it. Tom Hopper has written a blog on rewriting qcc plot using ggplot2 and grid, , xlab="Months", ylab="Service Levels %", title="Phone Call SVL", label.limits= c("5%", "13%")) Q2 <- qcc(dataset, type="xbar", nsigmas=1, labels=months, xlab= "Month", ylab = "Service Level %", title = "Phone Call SVL", digits=3, label.limits = c("76%", "80%"), plot=FALSE)Īnd then use each q1 & q2 with a plot method allowing to erase the y axis and redifine a new one with somekind of thicks. Q1 <- qcc(dataset, type="R", nsigmas=1, labels=months, xlab= "Month", ylab = "Service Level %", title = "Phone Call SVL", digits=3, label.limits = c("5%", "14%"),plot=FALSE) My best bet would be to define the qcc : q1 R Chart and q2 xBar in respectice class with a plot=False attribute library(qcc) So in this case I don't believe y axis percentage formatting could be done in one shot. I used numeric for simplicity.Īlso I noticed that even if qcc library offers a wide variety of statisitic chart, it doesn't seem to haveĪny qcc - y axis formatting options parameter as you would probably find using scaling_y_continuous in ggplot2 library. We both agree that a real life scenario would have gone through a much fancier scenario such as querying dataįrom a server and even adding conversion at some stage. The idea was basically to create a series of 4 weeks subsets over a 12 months period sort if thing. For the sake of simplicity, I mainly used mock data which I entered Process.capability(q2, spec.limits=c(lsl,usl)) # draw the process capability chart and calculate metrics: # Establish the LSL and USL as set by customer specs, then Which should generate following X-Bar Chart: Q2 <- qcc(my.data, type="xbar", nsigmas=3) # Draw the X-Bar Chart and calculate relevant metrics Then add following to ldraw the X-BAR chart. # Draw the R Chart and calculate relevant metrics # Include those subgroups into a my.data mock list through rbind # Load a mock list of 10 subgroup data manually: So for for simplicity I just added a list of subgroup manually. In true life scenario, I'd say the following data would probably be obtained as a result
0 Comments
Leave a Reply. |