Home > Mobile >  Recreate a plot without data
Recreate a plot without data

Time:04-28

Is there a way to create a figure similar to the one below without having any data on this?

enter image description here

CodePudding user response:

You could do something like this. You could add another geom_curve and a couple of geom_vlines.

library(tidyverse)

ggplot()  
  geom_abline()  
  geom_curve(aes(x = 0, y = 0, xend = 1, yend = 1), curvature = -0.4)  
  annotate("text", x = 0.5, y = 0.5, label = "Line of Equality", angle = 35, vjust = 2)  
  labs(x = "Individuals Neighbourhoods\nAcross Space", y = "Scoioeconomic Position")  
  theme_minimal()  
  theme(axis.text = element_blank())

Created on 2022-04-27 by the enter image description here

  • Related