I have a data.frame df with columns T
,V1
,V2
,V3
,V4
I would like to make a ggplot containing two plots with T
as the common the x axis
The first plot contains V1
The second plot contains V2
,V3
,V4
I tried:
m1 <- melt(df, id = "T")
chart1<-qplot(T, value, data = m1, geom = "line", group = variable) +
stat_smooth() +
facet_grid(variable ~ ., scale = "free_y")
But this gives me four common plots whereas I just want two. Is there a way to do this?