Dear,

I can't plot legend over a Rasterlayer.

My system is MAC OS Lion.

See my problem:

####### Data

> img

class       : RasterLayer

dimensions  : 5, 5, 25  (nrow, ncol, ncell)

resolution  : 0.002245, 0.002245  (x, y)

extent      : -48.33875, -48.32753, -20.35756, -20.34634  (xmin, xmax,
ymin, ymax)

coord. ref. : +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84
+towgs84=0,0,0

values      : in memory

min value   : 2116

max value   : 36070


##### plot Rasterlayer

> plot(img, col=rev(terrain.colors(25)), axes = TRUE, xlab="x", ylab="y",
useRaster=TRUE)

Erro em as.double(y) :

  cannot coerce type 'S4' to vector of type 'double'


I can plot the data with image function, but i don't know put the legend
with the color palette.


Thanks

Julio

        [[alternative HTML version deleted]]

______________________________________________
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