Использование:
par(mfrow=c(1,3))
DF1 = data.frame(Month = 1:12, A = runif(12, 1,10), B = runif(12,5,10), C = runif(12, 3,9))
DF2 = data.frame(Month = 1:12, A = runif(12, 4,13), B = runif(12,6,14), C = runif(12, 3,12))
DF3 = data.frame(Month = 1:12, A = runif(12, 2,15), B = runif(12,1,9), C = runif(12, 3,15))
plot(DF1$Month, y=DF1$A, "l")
lines(DF2$A, col = "red")
lines(DF3$A, col = "blue")
plot(DF1$Month, y=DF1$B, "l")
lines(DF2$B, col = "red")
lines(DF3$B, col = "blue")
plot(DF1$Month, y=DF1$C, "l")
lines(DF2$C, col = "red")
lines(DF3$C, col = "blue")
Вы можете сбросить область построения обратно на 1 x 1 с помощью dev.off()
РЕДАКТИРОВАТЬ: решение ggplot будет:
library(ggplot2)
library(gridExtra)
p1 <- ggplot(NULL)+
geom_line(data = DF1,aes(x=Month,y=A),color="black")+
geom_line(data = DF2,aes(x=Month,y=A),color="red")+
geom_line(data = DF3,aes(x=Month,y=A),color="blue")
p2 <- ggplot(NULL)+
geom_line(data = DF1,aes(x=Month,y=B),color="black")+
geom_line(data = DF2,aes(x=Month,y=B),color="red")+
geom_line(data = DF3,aes(x=Month,y=B),color="blue")
p3 <- ggplot(NULL)+
geom_line(data = DF1,aes(x=Month,y=C),color="black")+
geom_line(data = DF2,aes(x=Month,y=C),color="red")+
geom_line(data = DF3,aes(x=Month,y=C),color="blue")
grid.arrange(p1,p2,p3,nrow=1)