Overlapping borders in choropleth plotting in R
I am trying to color counties according to certain criteria and then add
borders to some counties according to another criteria. The problem is
both the base plotting package and ggplot2 cover up some of the borders
that I care about; if a red bordered county is adjacent to all black
bordered counties the red border is sometimes covered up. Does anyone have
a fix for this?
Edit: I have found a way in the base plotting package. When reading in the
shapefile using readShapeSpatial from maptools there is a slot called
plotOrder. If you rearrange the plot order so that the counties with red
borders are plotted last, it does a better job.
No comments:
Post a Comment