Le 13.02.2006 05:12, Abd Rahman Kassim a ??crit :> Dear All, > > I have a question on overlaying a filled.contour (e.g. on soil properties data) and contour (by elevation) in one graph. Both have the same z matrix dimension. I'm able to overlay both graph, but the plots dimension did not overlap well on the same plots. How can I have both filled.contour and contour on the same graph? The commands that I have written are as follows: > > filled.contour(0:15,0:10,t(matrix(Total.C,nrow=11,ncol=16))) > contour(0:15,0:10,as.matrix(elev),add=T) > > Thanks for anay assistance. > > Regards. > > > Abd Rahman Kassim > Forest Research Institute Malaysia > Kepong 52109 > Selangor, MALAYSIA >Hi, The trick is to use the argument plot.axes of filled.contour There are examples of that in ?filled.contour See also : http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=128 Romain -- visit the R Graph Gallery : http://addictedtor.free.fr/graphiques mixmod 1.7 is released : http://www-math.univ-fcomte.fr/mixmod/index.php +---------------------------------------------------------------+ | Romain FRANCOIS - http://francoisromain.free.fr | | Doctorant INRIA Futurs / EDF | +---------------------------------------------------------------+
Besides the answers you already have, you might look at my "4D" graph example (with code) on the R Graphics Gallery: http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=90 I think it does exactly what you are asking, and therefore it might fit your needs with only slight code modification. Mike Prager Abd Rahman Kassim wrote on 2/12/2006 11:12 PM:> Dear All, > > I have a question on overlaying a filled.contour (e.g. on soil properties data) and contour (by elevation) in one graph. Both have the same z matrix dimension. I'm able to overlay both graph, but the plots dimension did not overlap well on the same plots. How can I have both filled.contour and contour on the same graph? The commands that I have written are as follows: > > filled.contour(0:15,0:10,t(matrix(Total.C,nrow=11,ncol=16))) > contour(0:15,0:10,as.matrix(elev),add=T) > > Thanks for anay assistance. > > Regards. > > > Abd Rahman Kassim > Forest Research Institute Malaysia > Kepong 52109 > Selangor, MALAYSIA > > ***************************************** > > > ***************************************** > [[alternative HTML version deleted]] > > ______________________________________________ > 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 >-- Michael H. Prager, Ph.D. Population Dynamics Team NOAA Center for Coastal Habitat and Fisheries Research NMFS Southeast Fisheries Science Center Beaufort, North Carolina 28516 USA http://shrimp.ccfhrb.noaa.gov/~mprager/
Abd Rahman Kassim
2006-Feb-13 04:12 UTC
[R] Plotting contour & filled.contour in one graph
Dear All, I have a question on overlaying a filled.contour (e.g. on soil properties data) and contour (by elevation) in one graph. Both have the same z matrix dimension. I'm able to overlay both graph, but the plots dimension did not overlap well on the same plots. How can I have both filled.contour and contour on the same graph? The commands that I have written are as follows: filled.contour(0:15,0:10,t(matrix(Total.C,nrow=11,ncol=16))) contour(0:15,0:10,as.matrix(elev),add=T) Thanks for anay assistance. Regards. Abd Rahman Kassim Forest Research Institute Malaysia Kepong 52109 Selangor, MALAYSIA ***************************************** ***************************************** [[alternative HTML version deleted]]