[R] vis.gam() contour plots

Gavin Simpson gavin.simpson at ucl.ac.uk
Tue Oct 13 21:46:24 CEST 2009


On Mon, 2009-10-12 at 22:20 -0400, David Winsemius wrote:
> On Oct 12, 2009, at 8:20 PM, Jason Gasper wrote:
<snip />
> # contour examples.... vis.gam(g,  
> view=c("x1","x2"),plot.type="contour",color="heat", nlevels=20)
> Warning messages:
> 1: In plot.window(...) : "nlevels" is not a graphical parameter
> 2: In plot.xy(xy, type, ...) : "nlevels" is not a graphical parameter
> 3: In axis(side = side, at = at, labels = labels, ...) :
>    "nlevels" is not a graphical parameter
> 4: In axis(side = side, at = at, labels = labels, ...) :
>    "nlevels" is not a graphical parameter
> 5: In box(...) : "nlevels" is not a graphical parameter
> 6: In title(...) : "nlevels" is not a graphical parameter
> 
> # This does result in warnings that do not seem correct (since nlevels  
> is listed as a graphics parameter in the help page of contour)

They are correct for a certain definition of "graphical parameter", and
'nlevels' is an argument to contour. IIRC this really refers to things
in ?par and is a common issue that I have come across when coding
function that pass some arguments in '...' to other functions and some
to plotting functions. There are ways around this, but I don't have the
details to hand - Prof. Ripley suggested one solution that is used
within base R to get round this problem, and which we subsequently used
in the vegan package.

HTH

G

>  but the  
> desired effect seems to be occurring. I have seen such warnings many  
> times before an have learned to ignore them. Whether that is the  
> correct posture to assume, I am not sure.
> > Thanks
> 
> --
> 
> David Winsemius, MD
> Heritage Laboratories
> West Hartford, CT
> 
> ______________________________________________
> 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.
-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 Dr. Gavin Simpson             [t] +44 (0)20 7679 0522
 ECRC, UCL Geography,          [f] +44 (0)20 7679 0565
 Pearson Building,             [e] gavin.simpsonATNOSPAMucl.ac.uk
 Gower Street, London          [w] http://www.ucl.ac.uk/~ucfagls/
 UK. WC1E 6BT.                 [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%




More information about the R-help mailing list