[R] about image() function in R and colors

javier garcia rn001 at cebas.csic.es
Thu Jul 7 13:23:23 CEST 2005


I've got a map in R imported from a GIS (GRASS) as a vector of factors.
So I've got 20 different levels in the map and I've created a vector of custom 
colors of exactly 20 colors in lenght.
I'm trying to use image()  (really plot.grassmeta() that call image()) to plot 
the map with those colors but it doesnt work and the colors are changed.

I would like that all points belonging to level1 are color 1 , and so on...

Please could you tell me if this procedure is not correct?

Best regards,


A. Javier Garcia
Water and Soil conservation department
Campus Universitario Espinardo
PO BOX 164
30100 Murcia (SPAIN)
Phone: +34 968 39 62 57
Fax: +34 968 39 62 13
email: rn001 at cebas.csic.es

More information about the R-help mailing list