Draw geom_tile borders inside squares to prevent overlap : <p>I would like to be able to draw borders on <code>geom_tile</code> that do not overlap so that borders can convey their own information without confusing the viewer with disappearing borders.</p>

<pre><code>library(ggplot2)

state &lt;- data.frame(p=runif(100), x=1:10, y=rep(1:10, each=10), z=rep(1:5, each=20))

ggplot(state, aes(x, y)) + 
  geom_tile(aes(fill = p, color=as.factor(z)), size=2)
</code></pre>

<p><a href="https://i.stack.imgur.com/6TGew.png" rel="noreferrer"><img src="https://i.stack.imgur.com/6TGew.png" alt="geom_tile plot with overlapping borders"></a></p>

<p>I trust you can see how confusing overlapping borders can be.</p>
