powered by
geom_hline
geom_vline
geom_hvline(mapping = NULL, data = NULL, position = "identity", show.legend = FALSE, ...)
aes
aes_string
FALSE
layer
xintercept
alpha
colour
linetype
size
p <- ggplot(mtcars, aes(x = wt, y = mpg)) + geom_point() # vline p + geom_hvline(data = data.frame(wt= 3)) # hline p + geom_hvline(data = data.frame(mpg= 20))
Run the code above in your browser using DataLab