Dear all, I can't figure out a way to have more than one plot using filled.contour() in a single plate. I tried to use layout() or par(), but the way filled.contour() is written seems to override those commands. Any suggestions would be really appreciated. Jonathan [[alternative HTML version deleted]]
Take a look at the code for filled.contour(). You'll find a line beginning .Internal(filledcontour( You can adapt this line and the lines around it to achieve what you want. Good luck Bob Kinley -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Jonathan Hughes Sent: 04 July 2012 02:01 To: r-help at r-project.org Subject: [R] help with filled.contour() - Dear all, I can't figure out a way to have more than one plot using filled.contour() in a single plate. I tried to use layout() or par(), but the way filled.contour() is written seems to override those commands. Any suggestions would be really appreciated. Jonathan [[alternative HTML version deleted]] ______________________________________________ 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.
On Jul 3, 2012, at 9:01 PM, Jonathan Hughes wrote:> Dear all, > I can't figure out a way to have more than one plot using > filled.contour() in a single plate. I tried to use layout() or > par(), but the way filled.contour() is written seems to override > those commands. > Any suggestions would be really appreciated. > Jonathan > > [[alternative HTML version deleted]]This is the code in filled.contour that is overriding you par() efforts. mar.orig <- (par.orig <- par(c("mar", "las", "mfrow")))$mar on.exit(par(par.orig)) w <- (3 + mar.orig[2L]) * par("csi") * 2.54 layout(matrix(c(2, 1), ncol = 2L), widths = c(1, lcm(w))) par(las = las) mar <- mar.orig mar[4L] <- mar[2L] mar[2L] <- 1 par(mar = mar) plot.new() You could rewrite the function to allocate space differently. Note this portion of the layout help page: "These functions are totally incompatible with the other mechanisms for arranging plots on a device: par(mfrow),par(mfcol) and split.screen." -- David Winsemius, MD West Hartford, CT