Skip to content

Regression with width aesthetic in documentation #1904

Closed
@gfiumara

Description

@gfiumara

A warning is omitted when using the width aesthetic, but still seems to produce identical plots.

Example from ggplot2 documentation for geom_tile:
2.1 Documentation, Dev Documentation

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")

ggplot2 2.2:

Warning: Ignoring unknown aesthetics: width

ggplot2 2.1:

No output

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behaviorlayers 📈

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions