>>> "Devred, Emmanuel" <[EMAIL PROTECTED]> 13/03/2008 18:08:45
>>>
Dear R-users,

>I haven't found a way in the searchable archive to overplot a contour
>(lines) over a surface.

I got round this by using the plot.axis parameter, which accepts a set
of plotting commands and isn't fussy about what. Since this is
implemented before the plot parameters are reset on return, it puts the
contours in the right places without hacking about with par() etc.

My example (from a response surface fit to some analytical chemistry
data) was 

filled.contour(x=HCl, y=HNO3, z=td.g, 
        plot.axes={axis(1);axis(2);contour(x=HCl, y=HNO3, z=td.g,
add=T)}, 
        color=rgb.palette, 
        main="Typical Diet", xlab="HCl (ml)", ylab="HNO3 (ml)")

In this example, HCl and HNO3 were the two independent variables and
td.g was the matrix of responses.
Note the call to contour(... add=T) inside plot.axes={}. rgb.palette
was just an alternative rainbow-like palette I'd defined using .






*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}

______________________________________________
R-help@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.

Reply via email to