[R] color.ramp in maptools

Marco Albani malbani at fas.harvard.edu
Fri Mar 26 18:01:40 CET 2004

Dear list members,

I am trying to use the maptools library to display geographical data. At 
the moment I have some trouble understanding how the " auxvar " variable 
is supposed to be used in the plot.Map function.

I am using R Version 1.8.1  (2003-11-21) on Linux

Looking at the plot.Map function itself, I see that it calls a 
color.ramp function (I am reporting only the relevant part here):

     if (attr(theMap$Shapes, "shp.type") == "poly") {
         if (!is.null(auxvar) && nclass > 1) {
             col.rmp <- color.ramp(nclass, nvec = auxvar)
             for (i in recs) {

I don't seem to be able to get any information on this color.ramp 
function. In fact the function doesn't seem to exist if I search for it 
with ls()

Does anyone have any insight?

Marco Albani, Ph.D.
Postdoctoral Fellow
Dept. of Organismic and Evolutionary Biology
Harvard University
HUH 22 Divinity Avenue
Cambridge, MA
02138-2094 USA

Tel: +1 617 495 1621
Fax: +1 617 495 9484


More information about the R-help mailing list