library(ggplot2)
A path plot joins data points in the order that they appear in the x and y vectors (as opposed to a line plot - geom_line()
- which joins data points in ascending order according to their x-values).
p <- ggplot(economics, aes(date, unemploy))
p <- p + geom_path(lineend = "butt", linejoin = "round", linemitre = 1)
print(p)
p <- ggplot(economics, aes(date, unemploy))
p <- p + geom_ribbon(aes(ymin = unemploy - 900, ymax = unemploy + 900))
print(p)
p <- ggplot(mpg, aes(cty, hwy))
p <- p + geom_label(aes(label = cty))
print(p)
p <- ggplot(mpg, aes(cty, hwy))
p <- p + geom_jitter(height = 2, width = 2)
print(p)
p <- ggplot(mpg, aes(cty, hwy))
p <- p + geom_point()
print(p)
p <- ggplot(mpg, aes(cty, hwy))
p <- p + geom_quantile()
print(p)
p <- ggplot(mpg, aes(cty, hwy))
p <- p + geom_rug(sides = "bl")
print(p)
p <- ggplot(mpg, aes(cty, hwy))
p <- p + geom_smooth(method = "lm")
print(p)
p <- ggplot(mpg, aes(cty, hwy))
p <- p + geom_text(aes(label = cty))
print(p)