We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8415be8 commit 6a9bc74Copy full SHA for 6a9bc74
R/ggplot-global.R
@@ -46,8 +46,10 @@ ggplot_global$all_aesthetics <- .all_aesthetics
46
47
ggplot_global$base_to_ggplot <- .base_to_ggplot
48
49
+# These two vectors must match in length and position of symmetrical aesthetics
50
+# xintercept2 is a filler to match to the intercept aesthetic in geom_abline
51
ggplot_global$x_aes <- c("x", "xmin", "xmax", "xend", "xintercept",
- "xmin_final", "xmax_final", "xlower", "xmiddle", "xupper", "x0")
52
+ "xmin_final", "xmax_final", "xlower", "xmiddle", "xupper", "x0", "xintercept2")
53
-ggplot_global$y_aes <- c("y", "ymin", "ymax", "yend", "yintercept", "ymin_final",
- "ymax_final", "lower", "middle", "upper", "y0", "intercept")
54
+ggplot_global$y_aes <- c("y", "ymin", "ymax", "yend", "yintercept",
55
+ "ymin_final", "ymax_final", "lower", "middle", "upper", "y0", "intercept")
tests/testthat/test-utilities.r
@@ -87,3 +87,7 @@ test_that("parse_safe works with multi expressions", {
87
expression(NA, 1, 2, a)
88
)
89
})
90
+
91
+test_that("x and y aesthetics have the same length", {
92
+ expect_equal(length(ggplot_global$x_aes), length(ggplot_global$y_aes))
93
+})
0 commit comments