I have an object of the SpatialPointsDataFrame class that looks like this:
coordinates div score
1 (-86.2905, 32.7131) 1 0.73
2 (-113.17, 34.4462) 2 3.00
3 (-112.769, 35.1567) 4 0.94
4 (-113.193, 33.9167) 5 4.09
5 (-113.265, 34.407) 1 1.50
6 (-113.585, 34.8241) 2 5.98
7 (-113.793, 34.7597) 3 2.55
8 (-113.651, 35.1733) 2 3.21
9 (-113.675, 35.3431) 4 2.83
10 (-113.09, 34.4036) 5 6.07
11 (-114.172, 34.6878) 1 4.56
12 (-120.153, 37.3049) 3 7.00
and I want to create one map for each category "div"(5 in total) with point colors different from the column score(which varies from 0 to 7).
My main problem: How to use the same color scale on different cards so that I can compare them?
I believe that a function spplotcan do exactly what I want, but I could not understand how the arguments of this function work. If this is a function, I have another question: how to build the borders of continents beyond points? (I use data wrld_simplthat is already in R)
source
share