[R] Plotting 27 line plots in one page

Adaikalavan Ramasamy ramasamy at cancer.org.uk
Fri Feb 10 00:34:45 CET 2006


Try 

 par( mfrow=c(9,3) )
 for(i in 1:27) plot( lls[[i] )

but I think it might be a little crowded to put 9 rows in a page. 

Also check out the lattice package which is bit more complicated to
learn but gives prettier output.

Regards, Adai


On Thu, 2006-02-09 at 11:52 -0800, Srinivas Iyyer wrote:
> Dear group, 
>  I am a novice programmer in R.  I have a list that
> has a length of 27 elements. Each element is derived
> from table function. 
> 
> >lls <- table(drres)
> 
> >legnth(lls)
> 27
> 
> I want to plot all these elements in 9x3 plot (9 rows
> and 3 columns)
> par(9,3)
> > mypltfunc <- function(mydata){
> + for (i in 1:27){
> + plot(unlist(mydata[i]))
> + }
> + }
> 
> > mypltfunc(lls)
> > 
> 
> In the graphics window, all 27 figures are drawn in
> fraction of sec, one by one and I get to see the last
> graph.  It is not drawing into this 9X3 grid. 
> 
> Could any one help me please. 
> 
> Thanks
> sri
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>




More information about the R-help mailing list