-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Inconsistent formals for StatIdentity$compute_layer
#3202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks. I quickly checked the code.
Let me see if there are some historical reasons. |
I found no special reason to keep them as is. It seems just because the common set of formals was BTW,
this is correct, but actually ggplot2 has only three $ git grep "compute_layer = "
R/position-.r: compute_layer = function(self, data, params, layout) {
R/position-identity.r: compute_layer = function(data, params, scales) {
R/position-jitter.r: compute_layer = function(data, params, panel) {
R/position-nudge.R: compute_layer = function(data, params, panel) {
R/stat-.r: compute_layer = function(self, data, params, layout) {
R/stat-bindot.r: compute_layer = function(self, data, params, panels) {
R/stat-identity.r: compute_layer = function(data, scales, params) { Oh, and positions might be good to fix as well. |
@yutannihilation can you make a PR for this? |
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/ |
The formals for
compute_layer
in the majority of the Stats in ggplot2 arec(self, data, params, layout)
Two Stats are different from the others:
StatBindot
andStatIdentity
.Is there a reason for the different formals for these 2 stats? Is this just a leftover from earlier version?
I'm certain the
StatIdentity$compute_layer
andStatBindot$compute_layer
argument names don't matter (either passed through or ignored) but it may be worth fixing for consistencyThe text was updated successfully, but these errors were encountered: