Question Details

No question body available.

Tags

r ggplot2

Answers (1)

Accepted Answer Available
Accepted Answer
January 7, 2026 Score: 2 Rep: 305 Quality: High Completeness: 80%

Unclear as to why it changed from 3.5.1 to 4.0.1 (likely something to do with facet's handling of space which changed with 4.0.0).

But the width,height parameters of geomtile handle is what you're looking for to reproduce your plot from 2021. However you might want to handle it differently if the values of your plot are changing across subplots or are generally bigger.

library(tidyverse, quietly = TRUE)
grid  
  leftjoin(grid, by = "subturf") |> 
  ggplot(aes(.x, .y, fill = cover)) +
  geomtile(colour = "red", width=1, height=1) +
  facetgrid(cols = vars(turf), rows = vars(spp))

plot