geom_line
ggplot(Orange, aes(age, circumference, color = Tree))+ geom_line()
library(cowplot) g1 <- ggplot(Orange, aes(age, circumference, color = Tree))+ geom_point() g2 <- ggplot(Orange, aes(age, circumference, color = Tree))+ geom_line() plot_grid(g1,g2)
+ facet_wrap(~Tree)
ggplot(Orange, aes(age, circumference, color = Tree))+ geom_point()+ geom_line()+ facet_wrap(~Tree)
The function uses the variable Tree to make a sub-plot for each value of the variable.
Tree