[R] help with filled.contour() -

David Winsemius dwinsemius at comcast.net
Wed Jul 4 14:27:56 CEST 2012

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
     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)

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  

David Winsemius, MD
West Hartford, CT

More information about the R-help mailing list