Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# ggplot2 (development version)

* `geom_tile()` now correctly recognises missing data in `xmin`, `xmax`, `ymin`,
and `ymax` (@thomasp85 and @sigmapi, #4495)

* `geom_hex()` will now use the binwidth from `stat_bin_hex()` if present,
instead of deriving it (@thomasp85, #4580)

Expand Down
5 changes: 5 additions & 0 deletions R/geom-tile.r
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,10 @@ GeomTile <- ggproto("GeomTile", GeomRect,

required_aes = c("x", "y"),

# These aes columns are created by setup_data(). They need to be listed here so
# that GeomRect$handle_na() properly removes any bars that fall outside the defined
# limits, not just those for which x and y are outside the limits
non_missing_aes = c("xmin", "xmax", "ymin", "ymax"),

draw_key = draw_key_polygon
)