New answers tagged

2

It looks like @rcs had the right idea, although generifying that into a function is a little more difficult. This blog post suggests that the 'easy way' is to use the non-CRAN package ggspatial (which looks like it has a geom_spatial() for use with Spatial* objects), but also contains the following non-package-ified function for use with SpatialPolygons ...


0

I really like using tmap for choropleth mapping in R. Here's the documentation. I think it's better for plotting maps. Here's an example of a function I once wrote to plot a choropleth map. function (function1_info, indicator, color_scheme, classes, classification, legend_title, map_title){ # The map plot will classify the data in quartiles, but the ...


0

Unfortunately, you cannot use spplot with base plotting. This is because spplot is a wrapper for lattice, which is a high level plotting engine. I have always found lattice obtuse and believe that it is becoming obsolete. If you are going to invest time in learning a higher level plotting engine I would recommend ggplot2. For you problem, there is no need ...



Top 50 recent answers are included