Now we are creating a histogram using R ggplot2.
At that time, I tried to draw the average value of the data on the histogram and executed the following code.
ggplot (hoge, aes (x = hoge)) +
geom_histogram (binwidth = 3, color ="darkgreen", fill ="skyblue") +
geom_vline (xintercept = mean (hoge $hoge)) +
xlab ("test") +
ylab ("test") +
theme_bw ()
Then, I could draw a line representing the average value, but it protruded below the x-axis.
I want to make this line range greater than or equal to y ≧ 0 so that it does not protrude below. Is there any way to do this?