[R] mfrow

From: Agus Susanto <gusanto_at_gmail.com>
Date: Tue, 13 May 2008 20:20:41 -0400


Dear members,
I want to create 8 graphs and write it into one page using mfrow=c(4,2). How to make all graphs (including the titles, legends, line types) to be scale down (resized proportionally).
As an illustration, below is the code:

pdf("testmfrow.pdf")
par(mfrow=c(4,2))

x<-seq(1:10)

y1<-rnorm(10)
y2<-rnorm(10,mean=2,sd=1)
y3<-rnorm(10,mean=3,sd=1)
y4<-rnorm(10,mean=4,sd=1)
y5<-rnorm(10,mean=5,sd=1)
y6<-rnorm(10,mean=6,sd=1)
y7<-rnorm(10,mean=7,sd=1)
y8<-rnorm(10,mean=8,sd=1)

plot(x,y1,type='o', lty=1, main="I want this title is to be scaled down
(resized)")

plot(x,y2,type='o', lty=2, main="I want this title is to be scaled down
(resized)")

plot(x,y3,type='o', lty=3, main="I want this title is to be scaled down
(resized)")

plot(x,y4,type='o', lty=4, main="I want this title is to be scaled down
(resized)")

plot(x,y5,type='o', lty=5, main="I want this title is to be scaled down
(resized)")

plot(x,y6,type='o', lty=6, main="I want this title is to be scaled down
(resized)")

plot(x,y7,type='o', lty=7, main="I want this title is to be scaled down
(resized)")

plot(x,y8,type='o', lty=8, main="I want this title is to be scaled down
(resized)")

dev.off()

Many thanks for any help/idea.

Gusanto

        [[alternative HTML version deleted]]



R-help_at_r-project.org mailing list
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. Received on Wed 14 May 2008 - 02:40:55 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 14 May 2008 - 04:30:41 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive