Dear all,

I have a small problem concerning labelling regions and areas in R. I want
to label a single polygon in a map. I succeed labelling to whole map, but
when I try a single polygon it did not work.

This is the command that I used:

#for the whole area it works#
plot(map)
centroids<-coordinates(map)
text(centroids,label=map$NAME)

#for a single polygon in whole map, it does not work#
plot(map)
centroids<-coordinates(map)[10,1:2]
text(centroids,label=map$NAME)

I appreciate any help.
Thank you all.

-- 
PhD-Student at the Centro de Desenvolvimento e Planejamento Regional-UFMG.
Doutorando do Centro de Desenvolvimento e Planejamento Regional-UFMG.
Doctorandus student van de Centro de Desenvolvimento e Planejamento
Regional-UFMG.

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to