[R] Make Multiple plots in R

John Kane
Thu, 31 Oct 2013 11:45:49 -0000

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