Merging plots ggplot2

Hi All!


In the graphs above, I do not want the first plot i.e. control separately but merged/overlaid on the other three plots. Here is the code I am using :slight_smile:

ggplot(df,aes(x=Time2,y=T_leaf3,color=on_off))+
geom_point()+facet_wrap(~Irrigation)+
geom_line()+scale_x_continuous(n.breaks = 6)

Data looks something like this:

Thanks in Advance

Because it is a faceted plot I would think you need to replicate the “control” data I1_0M and added the same data but for all other irrigations. Then when u color based on On_Off the control would show up on all plots. But, if u find a better way, please let me know.

Just googled it and found this r - ggplot2 - include one level of a factor in all facets - Stack Overflow

1 Like

I think we got it, just that color = Irrigation instead of color=on_off
Thank you @rcrd

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.