const-ae/ggsignif

Warning message: Ignoring unknown aesthetics: xmin, xmax, annotations, y_position

bersbersbers opened this issue · 3 comments

This example code from https://github.com/const-ae/ggsignif raises a warning:

Warning message: Ignoring unknown aesthetics: xmin, xmax, annotations, y_position

library(ggplot2)
library(ggsignif)
annotation_df <- data.frame(
  color = c("E", "H"),
  start = c("Good", "Fair"),
  end = c("Very Good", "Good"),
  y = c(3.6, 4.7),
  label = c("Comp. 1", "Comp. 2")
)

annotation_df
#>   color start       end   y   label
#> 1     E  Good Very Good 3.6 Comp. 1
#> 2     H  Fair      Good 4.7 Comp. 2

ggplot(diamonds, aes(x = cut, y = carat)) +
  geom_boxplot() +
  geom_signif(
    data = annotation_df,
    aes(xmin = start, xmax = end, annotations = label, y_position = y),
    textsize = 3, vjust = -0.2,
    manual = TRUE
  ) +
  facet_wrap(~color) +
  ylim(NA, 5.3)

I also met same problem, can you give us some help? @const-ae

As mentioned in README:

You can ignore the warning about the missing aesthetics.

In the long run, we will see if we can get rid of this warning.