tomhopper / qcc_ggplot Goto Github PK
View Code? Open in Web Editor NEWRewrite of plot.qcc (from the qcc package) using ggplot and grid.
License: MIT License
Rewrite of plot.qcc (from the qcc package) using ggplot and grid.
License: MIT License
Building a qcc plot now fails with an error:
Error in order(data$PANEL, data$group, data$x) :
argument 3 is not a vector
14 order(data$PANEL, data$group, data$x)
13 `[.data.frame`(data, order(data$PANEL, data$group, data$x), )
12 data[order(data$PANEL, data$group, data$x), ]
11 f(...)
10 self$geom$setup_data(data, c(self$geom_params, self$aes_params))
9 f(..., self = self)
8 l$compute_geom_1(d)
7 f(l = layers[[i]], d = data[[i]])
6 by_layer(function(l, d) l$compute_geom_1(d))
5 ggplot_build(qc.gplot)
4 ggplot_gtable(ggplot_build(qc.gplot))
3 plot.qcc(object, ...)
2 plot(object, ...)
1 qcc(my.xmr.raw, type = "xbar.one", title = "Individuals Chart\nfor Wheeler sample data")
> packageVersion("ggplot2")
[1] ‘2.2.1’
> x <- qcc(my.xmr.raw, type = "xbar.one", newdata = my.xmr.new, plot = TRUE)
Hide Traceback
Rerun with Debug
Error: Discrete value supplied to continuous scale
22. stop("Discrete value supplied to continuous scale", call. = FALSE)
21. scales::train_continuous(x, self$range)
20. f(..., self = self)
19. self$range$train(x)
18. f(..., self = self)
17. scales[[i]][[method]](data[[var]][scale_index[[i]]])
16. FUN(X[[i]], ...)
15. lapply(seq_along(scales), function(i) {
scales[[i]][[method]](data[[var]][scale_index[[i]]])
})
14. FUN(X[[i]], ...)
13. lapply(vars, function(var) {
pieces <- lapply(seq_along(scales), function(i) {
scales[[i]][[method]](data[[var]][scale_index[[i]]])
}) ...
12. scale_apply(layer_data, x_vars, "train", SCALE_X, x_scales)
11. f(...)
10. self$train_scales(x_scales, y_scales, layout, data, self$params)
9. f(..., self = self)
8. self$facet$train_positions(self$panel_scales$x, self$panel_scales$y,
layout, data)
7. f(..., self = self)
6. layout$train_position(data, scale_x(), scale_y())
5. ggplot_build(qc.gplot)
4. ggplot_gtable(ggplot_build(qc.gplot)) at qcc.plot.R#336
3. plot.qcc(object, ...)
2. plot(object, ...)
1. qcc(my.xmr.raw, type = "xbar.one", newdata = my.xmr.new, plot = TRUE)
qcc(my_data, type = "xbar.one", rules = beyond.limits)
Error in violations$violating.runs :
$ operator is invalid for atomic vectors
qcc(my_data, type = "xbar.one", rules = violating.runs)
Error in violations$violating.runs :
$ operator is invalid for atomic vectors
The labels
argument to qcc()
is used to label the x-axis with user-supplied character vector labels in the qcc package. This functionality is not implemented in the current ggplot2 rewrite.
plot.qcc()
in the qcc package allows a user-defined orientation for axis tick mark labels via the axes.las
argument. This functionality is not implemented in the current ggplot2 rewrite.
Would it be possible to add an option for your implementation to use plotly on top of ggplot? It would be nice to have some interactivity with the plots.
my_data <- c(5054, 4350, 4350, 3975, 4290, 4430, 4485, 4285, 3980, 3925, 3645, 3760, 3300, 3685, 3463, 5200)
qcc(my_data, type = "xbar.one", rules = shewhart.rules, newdata = my_data[1:6])
Hide Traceback
Rerun with Debug
Error: breaks
and labels
must have the same length
7 stop("breaks
and labels
must have the same length", call. = FALSE)
6 check_breaks_labels(breaks, labels)
5 continuous_scale(c("x", "xmin", "xmax", "xend", "xintercept"),
"position_c", identity, name = name, breaks = breaks, minor_breaks = minor_breaks,
labels = labels, limits = limits, expand = expand, oob = oob,
na.value = na.value, trans = trans, guide = "none")
4 scale_x_continuous(expand = c(0, 0.5), limits = xlim, breaks = df.indices,
labels = xlabs) at qcc.plot.R#185
3 plot.qcc(object, ...)
2 plot(object, ...)
1 qcc(my_data, type = "xbar.one", rules = shewhart.rules, newdata = my_data[1:6])
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.