Skip to content

geom_qq_line() issues warning since #4866 #5010

@capnrefsmmat

Description

@capnrefsmmat

Consider the first example on the geom_qq documentation page:

df <- data.frame(y = rt(200, df = 5))
p <- ggplot(df, aes(sample = y))
p + stat_qq() + stat_qq_line()

In the released version of ggplot2, this issues no warning. On the v3.4.0-rc branch, this produces the warning

Warning message:
The following aesthetics were dropped during statistical transformation: sample
ℹ This can happen when ggplot fails to infer the correct grouping structure in the data.
ℹ Did you forget to specify a `group` aesthetic or to convert a numerical variable into a
  factor? 

Removing stat_qq_line() eliminates the warning. I believe this is due to #4866. I believe the warning is spurious, since no grouping aesthetics are necessary here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions