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().
|
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, ..., |
|
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()?
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
ggplot2/R/scale-continuous.r
Line 83 in 1f6f0cb
ggplot2/R/scale-continuous.r
Line 102 in 1f6f0cb
ggplot2/R/scale-discrete-.r
Line 63 in 1f6f0cb
ggplot2/R/scale-discrete-.r
Line 54 in 1f6f0cb
ggplot2/R/annotation.r
Lines 42 to 43 in 1f6f0cb
ggplot2/R/scale-date.r
Line 142 in 1f6f0cb
ggplot2/R/scale-date.r
Line 179 in 1f6f0cb
ggplot2/R/scale-date.r
Line 291 in 1f6f0cb
Is there a reason that any of these definitions should be different from the one in
scale_(x|y)_continuous()?