Skip to content

Ignoring unknown aesthetics warning in geom_tile() #2066

Closed
@vadimus202

Description

@vadimus202

Unanticipated warning displayed below. The height and width aesthetics are definitely used and not ignored.
Thanks!

library(ggplot2)

df <- data.frame(
    x = rep(c(2, 5, 7, 9, 12), 2),
    y = rep(c(1, 2), each = 5),
    z = factor(rep(1:5, each = 2)),
    w = rep(diff(c(0, 4, 6, 8, 10, 14)), 2)
)
ggplot(df, aes(x, y)) +
    geom_tile(aes(fill = z, width = w), colour = "grey50")
#> Warning: Ignoring unknown aesthetics: width

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions