Dear All,
I'm using the spmap command on a shape file on Italy. I need to use the option label which requires xcoordinates and ycoordinates to put labels over the Italian region polygons. I would like to put each label in the center of each polygon (=italian region). Is there a way to compute the centroid of each region polygon in Stata, whose coordinates I can use to center these labels?
Here's the command I'm using so far
spmap unemployment using italy_region.dta, id(_ID) clmethod(custom) clnumber(7) clbreaks(0 1 5 10 15 20 25) legend(label(2 "Less than 1%") label(3 "2%-5%") label(4 "5%-10%") label(5 "10%-15%") label(6 "15%-20%") label(7 "More than 20%")) label(data("`label.dta") x(xcoord) y(ycoord) label(unemployment) color(red))
If you know other options that do not compute the centroid, but would center the label in the polygon, that would be very very useful as well.
Thanks a lot!
I'm using the spmap command on a shape file on Italy. I need to use the option label which requires xcoordinates and ycoordinates to put labels over the Italian region polygons. I would like to put each label in the center of each polygon (=italian region). Is there a way to compute the centroid of each region polygon in Stata, whose coordinates I can use to center these labels?
Here's the command I'm using so far
spmap unemployment using italy_region.dta, id(_ID) clmethod(custom) clnumber(7) clbreaks(0 1 5 10 15 20 25) legend(label(2 "Less than 1%") label(3 "2%-5%") label(4 "5%-10%") label(5 "10%-15%") label(6 "15%-20%") label(7 "More than 20%")) label(data("`label.dta") x(xcoord) y(ycoord) label(unemployment) color(red))
If you know other options that do not compute the centroid, but would center the label in the polygon, that would be very very useful as well.
Thanks a lot!
Comment