diff --git a/NEWS.md b/NEWS.md index bee39c50b5..dda1466a56 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,8 @@ # ggplot2 (development version) +* Fix a bug in `geom_raster()` that squeezed the image when it went outside + scale limits (#3539, @thomasp85) + * The evaluation time of aesthetics can now be controlled to a finer degree. `after_stat()` superseeds the use of `stat()` and `..var..`-notation, ad is joined by `after_scale()` to allow for mapping to scaled aesthetic values. diff --git a/R/geom-raster.r b/R/geom-raster.r index 37828083ee..53f0e05207 100644 --- a/R/geom-raster.r +++ b/R/geom-raster.r @@ -45,7 +45,7 @@ geom_raster <- function(mapping = NULL, data = NULL, #' @export GeomRaster <- ggproto("GeomRaster", Geom, default_aes = aes(fill = "grey20", alpha = NA), - non_missing_aes = "fill", + non_missing_aes = c("fill", "xmin", "xmax", "ymin", "ymax"), required_aes = c("x", "y"), setup_data = function(data, params) {