I have a dataset:
dd <- data.frame(name = c(1,2,3,4,5,6,7,8,9,10,11,12), value = c(2,4,5,1,2,3,4, 7,8,10,14,20),type = c('a', 'a', 'a', 'b', 'b', 'b', 'b','c','c','c', 'c', 'c'))
I want to make plots:
library(ggplot2)
ggplot(dd, aes(x=name, y = value, color = type)) +
geom_smooth()
How could i put this plots on three separate graphs, so they will be compactly located one after one? What should i add or change in ggplot function?
P.S. It's just an example, im looking for some solution for case when there is not three but 14 types