[R-sig-Geo] Continuous colorbar legend for a SpatialPointsDataFrame object
Pierre Roudier
pierre.roudier at gmail.com
Fri Mar 26 20:13:11 CET 2010
Dear R users,
I am trying to produce a plot of a SpatialPointsDataFrame object,
including 15000 spatial observations, that are NOT regularly gridded.
My problem is that I do need an important number of colours in my
colour ramp : I'm using the option cuts=30. As a consequence, I end up
with a very small map, and a huge scale with coloured dots, like in
this simple example:
require(sp)
data(meuse)
coordinates(meuse) <- ~x+y
spplot(meuse,zcol="elev",cuts=30)
Is there a way to get a continuous colorbar legend on the side of the
plot, the way a SpatialPixelDataFrame would be plotted:
require(sp)
data(meuse.grid)
coordinates(meuse.grid) <- ~x+y
gridded(meuse.grid) <- TRUE
spplot(meuse.grid,zcol="dist",cuts=30)
Thanks,
Dr. Pierre Roudier
Postdoctoral Fellow
The University of Sydney
More information about the R-sig-Geo
mailing list