Re: [R] draw partition lines

From: Greg Snow <Greg.Snow_at_imail.org>
Date: Mon, 10 Mar 2008 10:41:05 -0600

Here is one approach (you can adapt as needed):

library(TeachingDemos)

par(mfrow=c(4,2))

plot(1:10)
plot(10:1)
plot(c(1:5,5:1))
plot(c(5:1,1:5))

tmp <- cnvrt.coords(1,0, input='fig')$usr # get right end coord tmp2 <- cnvrt.coords(0,NA, input='tdev')$usr # get left end par(xpd=NA) # turn off clipping
segments(tmp$x,tmp$y,tmp2$x,tmp$y, col='blue')

hist(rnorm(10))
hist(rnorm(100))
hist(rnorm(3))
hist(rnorm(10000))

Hope this helps,

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow_at_imail.org
(801) 408-8111
 
 


> -----Original Message-----
> From: r-help-bounces_at_r-project.org
> [mailto:r-help-bounces_at_r-project.org] On Behalf Of questions?
> Sent: Saturday, March 08, 2008 4:44 PM
> To: r-help_at_r-project.org
> Subject: [R] draw partition lines
>
> I am using par(mfrow(4,2)...) to plot multiple graphs in one frame.
> However, the plots naturally partitioned into two sets, the
> first two rows and the 3rd and 4th row are slightly
> different, I want them to be in one frame, but I also want to
> draw a line (or something to make top two rows/bottom two
> rows look slightly
> different) in between them?
>
> Any suggestions?
>
> Thanks
>
> ______________________________________________
> 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.
>
______________________________________________ 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 Mon 10 Mar 2008 - 16:49:00 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 Mon 10 Mar 2008 - 17:30:21 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