geom_tileで中抜きしたい

塗りつぶした長方形じゃなくて、淵にだけ色つけたい&そもそもgeom_tileの指定方法知らなかった。

df <- data.frame(
  x = c(1,2),
  y = c(3,4),
  z = c(1,2)
)
ggplot(df, aes(x, y)) + geom_tile(aes(fill = z))
ggplot(df, aes(x, y)) + geom_tile(aes(fill = z, width=2, height=0.5))
ggplot(df, aes(x, y)) + geom_tile(fill = NA, color = 'black')

上から順にPLOT結果。中心をデータで指定してwidth&heightでサイズの調整する。