Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

st: Question about -spmap-, defining polygons, and/or Stata colors

From   Stata Chris <>
Subject   st: Question about -spmap-, defining polygons, and/or Stata colors
Date   Mon, 16 Jan 2012 16:38:40 +0100

Dear list members,

I have a question about Pisani's -spmap- and Stata colors:

I'd like to draw a map with counties and states, and would like to
color treated counties darker than non-treated ones. I mostly get
there with the following command:
spmap Treated using "C:\coord", id(id) fcolor(Blues) ndfcolor(blue)
clmethod(unique) polygon(data("C:\states") osize(0.75))
legend(position(11)) title("Treated")

The only problem is that apparently for 4 counties the polygons are
not defined in my coordinates dataset. However, I know that these
areas (situated entirely within the treated region) should also be
colored as treated, so I'd like the non-defined to get the same color
as the treated areas. But I don't manage to. Any ideas?

I've tried entering -blue-, -navy- etc for -ndfcolor()- but never
manage to capture the same color as is automatically picked for the
surrounding areas using the "Blues" pattern. (same problem when I try
analogously with Reds).
I also considered whether I couldn't just define the missing polygons,
but I'm not sure how I would do that?

Thanks a lot for any suggestions,
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index