I am trying to fill the area above and right to the square in light grey. The background inside the square should be white and the point inside there still visible. The background above and to the right of the square should be light grey and the points there visible as well.
The "fill=blue" and "alpha=0" was just a bad workaround to obtain a white area there, but the blue is not really needed there.
Here is a short reproducible example
data_Z_pairs <- data.frame(Z = c(0.20, 0.1, 0.03), Z_tild = c(0.15, 0.03, 0.02))
p1 <- ggplot(data_Z_pairs, aes(Z, Z_tild))
p2 <- p1 + geom_point() +
theme_bw() +
theme(panel.grid = element_blank()) +
geom_abline(slope=1, intercept = 0, linetype = "dashed") +
geom_rect(mapping=aes(xmin=0, xmax=t0, ymin=0, ymax=t0, fill ="blue"),
alpha=0, color = "black") #
p2
I have tried it somehow with "geom_polygon" so far, but could not achieve my desired result


