Statalist


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

st: maps (or plots) and labels with different colors


From   "Vitorino, Maria Ana" <[email protected]>
To   [email protected]
Subject   st: maps (or plots) and labels with different colors
Date   Fri, 03 Apr 2009 13:32:30 -0500

Title: maps (or plots) and labels with different colors

Dear statalist users,

I would like to include labels with different colors to the same plot.
So, suppose I plot the following map:

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

(here the labels "1" and "2" will show up in blue on the map)

Now suppose I would like to add the following labels to the same plot:

 label(data ("coord.dta") select(keep if batch >3)  color(red) y(lati) x(longi)
label(batch) )

(i.e. I would like to include labels "3", "4" in red in the same plot)

Is this possible? If so, how can I achieve this?

Thanks,
Ana




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