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 -------------- next part -------------- A non-text attachment was scrubbed... Name: ndviAprilJuly2006.png Type: image/png Size: 54145 bytes Desc: ndviAprilJuly2006.png URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20131031/76123b61/attachment.png>
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
Hi Jusper The function plot is generic; the method used to create the image depends on the type of the data object with which you are working. So for example calling plot on an "lm" object actually calls plot.lm. If you type:> class(mybrick9)You will see the class of your object. The plot is often created by a method named after that class. For example, if the object is a class "geomap" object, then the plot is created by plot.geomap. To read the help on this function, type:> ?plot.geomapIf you want to check the methods available for your object, you can type:> methods(class = "geomap")I hope this helps. Best wishes Chris Chris Campbell, PhD Tel. +44 (0) 1249 705 450?| Mobile. +44 (0) 7929 628 349 ccampbell at mango-solutions.com?| http://www.mango-solutions.com Data Analysis the Delivers Mango Solutions 2 Methuen Park, Chippenham, Wiltshire. SN14 OGB UK -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Kiplimo, Jusper (ILRI) Sent: 31 October 2013 11:09 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 -- LEGAL NOTICE\ \ This message is intended for the use of ...{{dropped:18}}