I have a bar chart and I want to use a geom_rect to put a rect above the bars ...
library(tidyverse)
df<-tribble(
~Type,~Value,
"X", 23,
"Y", 33
)
df
df %>% ggplot(aes(x=Type,y=Value))+
geom_col()+
geom_point(aes(y=Value*1.3),color="red")
The geom_point is easy, but for a geom_rect, I need to specify
xmin/xmax and I have no idea how to find these?
