When `x` and `y` are discrete, one of the pixels seem to take over whole raster. Reprex: ``` r devtools::load_all("~/packages/ggplot2") #> ℹ Loading ggplot2 df <- data.frame( x = rep(c("A", "B"), 2), y = rep(c("C", "D"), each = 2), z = letters[1:4] ) ggplot(df, aes(x, y, fill = z)) + geom_raster() ``` <!-- --> <sup>Created on 2023-09-08 with [reprex v2.0.2](https://reprex.tidyverse.org)</sup>