# NOT RUN {
# generate artificial data
set.seed(4321)
x <- 1:100
y <- rnorm(length(x), mean = 10)
my.data <- data.frame(x, y)
ggplot(my.data, aes(x, y)) +
geom_quadrant_lines() +
geom_point()
ggplot(my.data, aes(x, y)) +
geom_quadrant_lines(linetype = "dotted") +
geom_point()
ggplot(my.data, aes(x, y)) +
geom_quadrant_lines(xintercept = 50, yintercept = 10, colour = "blue") +
geom_point()
ggplot(my.data, aes(x, y)) +
geom_quadrant_lines(xintercept = 50, pool.along = "y", colour = "blue") +
geom_point()
ggplot(my.data, aes(x, y)) +
geom_vhlines(xintercept = c(25, 50, 75), yintercept = 10 ,
linetype = "dotted", colour = "red") +
geom_point() +
theme_bw()
# }
Run the code above in your browser using DataCamp Workspace