I am trying to some line segments on the bottom of a histogram using ggplot2, overlaying a couple of line segments to indicate relevant parts of a distribution. I would like the green segment to be twice as thick as the gray segment, but the green segment always seems to be five times the thickness of the gray segment. Here's some toy data and my ggplot2 code:
library(ggplot2)
x<- as.data.frame(rnorm(1000, mean=50))
colnames(x) <- c("values")
ggplot(x, aes(x=values)) +
geom_histogram (binwidth=1,position="identity", col="black")+
theme_classic(base_size=18)+
theme(axis.line.x = element_line(colour = "black"),
axis.line.y = element_line(colour = "black"))+
geom_segment(aes(y=-10, yend=-10, col=I("darkgray"), size=.1,x=1, xend=100),show.legend=F)+
geom_segment(aes(y=-10, yend=-10, col=I("palegreen4"), size=.2,x=25,xend=75), show.legend=F)