[R] contour() should handle the asp parameter

Prof Brian Ripley ripley at stats.ox.ac.uk
Sun Dec 14 16:44:16 CET 2003


Given contour() has an add= argument whose use is demonstrated for this 
exact reason in `all good books on S', why complicate the contour 
function?

Contrary to popular belief, the `asp parameter' is not a parameter, but an 
argument of plot's default method.

On Sun, 14 Dec 2003, Patrick Giraudoux wrote:

> To my knowledge, the current version of contour.default() does not handle the 'asp' parameter. This can be embarassing when displaying eg geographical maps, etc... Submitted to the opinion of more experienced R programmers, contour.defaut() function should be changed according to the followings:
> 
> line 7: add = FALSE,asp=NA,...)
> line 33: plot.window(xlim, ylim, asp=asp,"")

And of course alter the documentation.

I suspect you could get away with passing ... to the plot.window call, 
which for clarity should be plot.window(xlim, ylim, "", asp = asp)

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list