If you only need outlines in the form of a single color, you can set fill = NAand then set na.valuetoNA
.data <- cbind(
expand.grid(x = 1:10, y = 1:10), z = runif(100))[sample(1:100,75), ]
ggplot(.data, aes(x = x, y = y)) + theme_bw() +
geom_tile(fill = NA, color = 'black', na.value = NA)
source
share