Skip to content
Prev 3940 / 29559 Next

plot a variable in a SpatialPolygons object

On Mon, 28 Jul 2008, Massimo Ventrucci wrote:

            
I'm planning to update the now very obsolete vignette in spdep soon. The 
easiest way to plot a variable from a SpatialPolygonsDataFrame object is 
the spplot method in the sp package (which spdep loads). Just try:

spplot(my_SpolDF, "myvar")

for a first cut.

Base graphics methods, such as plot(), are also available. The best online 
guide may be one of the units at:

http://www.bias-project.org.uk/ASDARcourse/

either "Vizualising Spatial Data" for the description, or your choice of 
the worked examples. There are also code examples and figures on the ASDAR 
book website: www.asdar-book.org; though this is still under construction, 
most things are there.

Roger