Statalist


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

st: multiple labels on spmap


From   Scott Merryman <scott.merryman@gmail.com>
To   statalist@hsphsun2.harvard.edu
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))

Scott

--------------------------------------------------------------------------------------------------------
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")

Thanks!

Ana
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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