[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: multiple labels on spmap

From   Scott Merryman <>
Subject   st: multiple labels on spmap
Date   Sat, 4 Apr 2009 08:21:39 -0500

You could add a scatter plot with labels on top of the map using
-graph addplot scatter...-.  For example:

 use "Italy-RegionsData.dta", clear

 spmap relig1 using "Italy-RegionsCoordinates.dta", id(id)
label(x(xcoord) y(ycoord) label(zone) color(blue ) select(keep if zone
<2) pos(12))

 graph addplot scatter ycoord xcoord, ms(none) mlab(region) mlabpos(6)
 mlabsize(small) legend(order(1 2 3 4))


But what if I want to superimpose the county names in the plot below?

spmap using "uscounty.dta" if state=="42", id(_ID) cln(2) ocolor(gs12 gs12)

fcolor(white white) legend(off) label(data ("coord.dta") select(keep
if batch <3)  color(blue) y(lati) x(longi)

label(batch) ) title("Big Foot Sightings in Pennsylvania")


*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index