New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

edit geom_tile aesthetics and fix docs #2510

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@malcolmbarrett

malcolmbarrett commented Apr 1, 2018

The geom_rect and geom_tile doc examples include an aesthetic parameter for width, but neither geom has that, so the examples produce this warning:

ggplot(df, aes(x, y)) +
  geom_tile(aes(fill = z, width = w), colour = "grey50")

# > Warning: Ignoring unknown parameters: width

For geom_tile, I moved height and width over to default_aes. For geom_rect, though, I just removed width = w from the example in the docs because it seemed like a mistake (since geom_rect calculates width from xmin and xmax).

Thanks!
Malcolm

@hadley hadley closed this in a11f786 May 1, 2018

hadley added a commit that referenced this pull request May 1, 2018

Make example code more parallel
And remove unneeded width aesthetic. Part of #2510
@hadley

This comment has been minimized.

Member

hadley commented May 1, 2018

Thanks! I ended up merging by hand so I could add a unit test too.

@lock

This comment has been minimized.

lock bot commented Oct 29, 2018

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Oct 29, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.