Re: [R] How to put multiple plots in the same window? (not par(mfrow=))

From: F Duan <f.duan_at_yale.edu>
Date: Sat 31 Jul 2004 - 02:45:49 EST

Thank all of you. That's exactly what I want.

Best,

Frank

Quoting Gavin Simpson <gavin.simpson@ucl.ac.uk>:

> F Duan wrote:
> > Dear All,
> >
> > I am sorry if this question has been asked before. Below is my Question:
> >
> > I want to put several plots in the same window, but I don’t want the blank
>
> > space between plots (like par(mfrow=)) --- that makes the plots too small.
>
> > Could anyone tell me how to do it?
> >
> > Thanks a lot.
> >
> > Frank
>
> ?split.screen
> ?layout
>
> are alternatives to par(mfrow = c()), but I think you need to look at
> the margins of the plots and reduce them to suit your purposes. See ?par
> and argument mar. For example:
>
> oldpar <- par(mfrow = c(2,2), mar = c(3,3,1,1) + 0.1)
> plot(1:10)
> plot(1:10)
> plot(1:10)
> plot(1:10)
> par(oldpar)
>
> # or
>
> layout(matrix(c(1,2,3,4), 2, 2, byrow = TRUE))
> layout.show(4)
> oldpar <- par(mar=c(3,3,1,1) + 0.1)
> plot(1:10)
> plot(1:10)
> plot(1:10)
> plot(1:10)
> par(oldpar)
>
> There is no room for labels/titles but adjust the mar to suit your
> requirements.
>
> Gav
> --
> %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
> Gavin Simpson [T] +44 (0)20 7679 5522
> ENSIS Research Fellow [F] +44 (0)20 7679 7565
> ENSIS Ltd. & ECRC [E] gavin.simpson@ucl.ac.uk
> UCL Department of Geography [W] http://www.ucl.ac.uk/~ucfagls/cv/
> 26 Bedford Way [W] http://www.ucl.ac.uk/~ucfagls/
> London. WC1H 0AP.
> %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
>
>



R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat Jul 31 03:27:38 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:55:23 EST