Using geom_ribbon() to visualize a corridor for your data
Let’s say you have some data like this
1 2 3 4 5 set.seed(42) data <- data.frame( x = seq(1,30), y = 0.3 * seq(1,30) + 2 * rnorm(30) ) So let’s plot it using ggplot:
1 2 library(ggplot2) ggplot(data, aes(x=x, y=y)) + geom_point() + geom_line() Plotting an aim-corridor If this is something like your revenue, pageviews or something like that you may ask: “Is this good or is this bad?