Skip to content

Consolidate definition of position aesthetics #3342

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

Closed
paleolimbot opened this issue May 24, 2019 · 0 comments · Fixed by #5640
Closed

Consolidate definition of position aesthetics #3342

paleolimbot opened this issue May 24, 2019 · 0 comments · Fixed by #5640

Comments

@paleolimbot
Copy link
Member

In attempting to refactor the guide code to work with position guides, I found 8 definitions of what is a position aesthetic, only one of which is used by is_position_aes().

ggplot2/R/aes.r

Lines 176 to 177 in 1f6f0cb

var[var %in% c("x", "xmin", "xmax", "xend", "xintercept")] <- "x"
var[var %in% c("y", "ymin", "ymax", "yend", "yintercept")] <- "y"

c("x", "xmin", "xmax", "xend", "xintercept", "xmin_final", "xmax_final", "xlower", "xmiddle", "xupper", "x0"),

c("y", "ymin", "ymax", "yend", "yintercept", "ymin_final", "ymax_final", "lower", "middle", "upper", "y0"),

sc <- discrete_scale(c("y", "ymin", "ymax", "yend"), "position_d", identity, ...,

sc <- discrete_scale(c("x", "xmin", "xmax", "xend"), "position_d", identity, ...,

ggplot2/R/annotation.r

Lines 42 to 43 in 1f6f0cb

x = x, xmin = xmin, xmax = xmax, xend = xend,
y = y, ymin = ymin, ymax = ymax, yend = yend

c("x", "xmin", "xmax", "xend"),

c("y", "ymin", "ymax", "yend"),

if (all(aesthetics %in% c("x", "xmin", "xmax", "xend", "y", "ymin", "ymax", "yend"))) {

Is there a reason that any of these definitions should be different from the one in scale_(x|y)_continuous()?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant