[R] help with filled.contour() -

Rui Barradas ruipbarradas at sapo.pt
Wed Jul 4 19:24:06 CEST 2012


Hello,

You can use .filled.contour (with initial dot) with par. I've tested it 
with one of the help page examples, reformulated to use the args of 
.filled.contour and it works.



x <- y <- seq(-4*pi, 4*pi, len = 100)
r <- sqrt(outer(x^2, y^2, "+"))
z <- cos(r^2)*exp(-r/(2*pi))
zlim <- range(z, finite=TRUE)
#
levels <- pretty(zlim, 20)
col <- heat.colors(20)
#
op <- par(mfrow=c(1, 2))
plot.new()
.filled.contour(x, y, z, levels = levels, col=col)
plot.new()
.filled.contour(x, y, z, levels = levels, col=col)
par(op)


Hope this helps,

Rui Barradas

Em 04-07-2012 09:39, Robert Douglas Kinley escreveu:
> 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.
>
> ______________________________________________
> 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.
>



More information about the R-help mailing list