Skip to content
Prev 7974 / 29559 Next

Adding labels to map with either spplot or maptools (or anything else suggested)

Thank you for the replies, Edzer and Weidong.

I did the following.  I used 'names(nc2)' (with respect to the
original code in Example 2), then, guessing and confirming that
'NAME_1' contained the region names, I changed the line 'text(...)' to
contain 'NAME_1' instead of 'NAME,' (as given below the output from
'names(nc2)').
[1] "ID_0"       "ISO"        "NAME_0"     "ID_1"       "NAME_1"
 [6] "VARNAME_1"  "NL_NAME_1"  "HASC_1"     "CC_1"       "TYPE_1"
[11] "ENGTYPE_1"  "VALIDFR_1"  "VALIDTO_1"  "REMARKS_1"  "Shape_Leng"
[16] "Shape_Area"

text(centroids, label=nc2$NAME_1)

As a follow up...

Is there a way to enlarge the map, rather than adjusting the font size
(via 'cex')?
Is there a way to rotate the map?

Thanks again,

Misha
On Wed, Apr 7, 2010 at 12:19 PM, Misha Spisok <misha.spisok at gmail.com> wrote: