[R] overlay two facet_grid

Ulrik Stervbo ulrik.stervbo at gmail.com
Thu Apr 21 06:10:08 CEST 2016


It sounds like you want to use grid.arrange() from gridExtra:
https://cran.r-project.org/web/packages/gridExtra/vignettes/arrangeGrob.html

Hope this helps,
Ulrik

On Thu, 21 Apr 2016 at 00:52 Jeff Newmiller <jdnewmil at dcn.davis.ca.us>
wrote:

>
> http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
>
> Overlaying aesthetics is possible. Overlaying graphs is not. Without
> sample data, concrete examples will be unlikely to  appear, so read the
> above link and pay attention to the dput function.
> --
> Sent from my phone. Please excuse my brevity.
>
> On April 20, 2016 3:01:43 PM PDT, "ch.elahe via R-help" <
> r-help at r-project.org> wrote:
> >Hi all,
> >Does anyone know how to overlay two facet_grids? I have two facet grids
> >as following:
> >
> >
>
> >ggplot(data=df,aes(x=TE,y=TR,color="orange"))+geom_point()+facet_grid(FS+TRJ~OR+INV,labeller=label_both)+xlim(0,200)+ylim(0,10000)
>
> >ggplot(data=df,aes(x=TE,y=TR))+geom_point(aes(color=TST))+facet_grid(FS+TRJ~OR+INV,labeller=label_both)+xlim(0,200)+ylim(0,10000)
> >
> >Thanks for any help!
> >Elahe
> >
> >______________________________________________
> >R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> >https://stat.ethz.ch/mailman/listinfo/r-help
> >PLEASE do read the posting guide
> >http://www.R-project.org/posting-guide.html
> >and provide commented, minimal, self-contained, reproducible code.
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

	[[alternative HTML version deleted]]



More information about the R-help mailing list