[R] Make Multiple plots in R

David Carlson dcarlson at tamu.edu
Thu Oct 31 14:42:47 CET 2013


You've left out all the critical code where you set graphics parameters (par()) to place four figures on one page. Probably you have reduced the margins so that there is no room for your labels. Note that xlab is printed but not ylab and there is no space for it. 

-------------------------------------
David L Carlson
Department of Anthropology
Texas A&M University
College Station, TX 77840-4352

-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of John Kane
Sent: Thursday, October 31, 2013 6:46 AM
To: Kiplimo Jusper (ILRI); r-help at r-project.org
Subject: Re: [R] Make Multiple plots in R

Without knowing what the data looks like it is a bit difficult to know.  See ?dput on how to supply sample data.

However I think that something like the ggplot2 package would be a good way to go, 

John Kane
Kingston ON Canada


> -----Original Message-----
> From: j.kiplimo at cgiar.org
> Sent: Thu, 31 Oct 2013 11:09:09 +0000
> To: r-help at r-project.org
> Subject: [R] Make Multiple plots in R
> 
> Dear All,
> 
> I would wish to make multiple plots and give title/ headings same time,
> is there a simpler/ tidier way compared to below(, especially the
> headings as they are missing)? See output attached.
> 
> #####################################Making multiple Plots
> start########################
> 
> plot(mybrick9, y = 2, col = terrain.colors( length(seq(0,1, by =
> .2))-1),breaks= seq(0, 1, by = 0.2), axes = T,
>      main = 'April 2006',
>      xlab = 'Longitude', ylab = 'Latitude',
>      cex.lab = 1, cex.axis = 1 )
> plot(mymap3, add = T)
> 
> plot(mybrick9, y = 5, col = terrain.colors( length(seq(0,1, by =
> .2))-1),breaks= seq(0, 1, by = 0.2), axes = T,
>      main = 'May 2006',
>      xlab = 'Longitude', ylab = 'Latitude',
>      cex.lab = 1, cex.axis = 1 )
> plot(mymap3, add = T)
> 
> plot(mybrick9, y = 8, col = terrain.colors( length(seq(0,1, by =
> .2))-1),breaks= seq(0, 1, by = 0.2), axes = T,
>      main = 'June 2006',
>      xlab = 'Longitude', ylab = 'Latitude',
>      cex.lab = 1, cex.axis = 1 )
> plot(mymap3, add = T)
> 
> plot(mybrick9, y = 11, col = terrain.colors( length(seq(0,1, by =
> .2))-1),breaks= seq(0, 1, by = 0.2), axes = T,
>      main = 'July 2006',
>      xlab = 'Longitude', ylab = 'Latitude',
>      cex.lab = 1, cex.axis = 1 )
> plot(mymap3, add = T)
> 
> #####################################Making multiple Plots
> end########################
> 
> Regards,
> Jusper
> ______________________________________________
> 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.

____________________________________________________________
GET FREE SMILEYS FOR YOUR IM & EMAIL - Learn more at http://www.inbox.com/smileys
Works with AIM®, MSN® Messenger, Yahoo!® Messenger, ICQ®, Google Talk™ and most webmails

______________________________________________
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.



More information about the R-help mailing list