[R] Is it possible to draw with function "image.asc " and show a legend strip in the same window?

riodementa jorge.nayamacias at gmail.com
Tue Nov 20 12:15:38 CET 2012


I want to represent a Raster map of class "asc", and in the same window a
list of points with the funcion points(x,y)..

I considered two options:
1. With image.plot(map) and then use points(x,y).
    It works, and the points are in the correct place, but when I maximize
the plot the points are moved to a wrong place.

My second option was using image.asc(map) and then use points(x,y) and all
works! I can minimize, maximize....
But with this option, for me is not possible to show a legend strip in the
right side of the window.

Any suggestion?

Yo can understand my problem using this:
CASE 1
 file1 <-  paste(system.file(package =
"adehabitat"),"ascfiles/elevation.asc", sep = "/")
 map<-import.asc(file1)
 image.plot(map,col=terrain.colors(100))
 points(700440,3160561)

CASE2
 image.asc(map,col=terrain.colors(100))
points(700440,3160561)


Lot of thanks, 
Jorge









--
View this message in context: http://r.789695.n4.nabble.com/Is-it-possible-to-draw-with-function-image-asc-and-show-a-legend-strip-in-the-same-window-tp4650150.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list