Bookmark and Share

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


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

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


From   Maurizio Pisati <[email protected]>
To   [email protected]
Subject   Re: st: Question about -spmap-, defining polygons, and/or Stata colors
Date   Tue, 17 Jan 2012 10:30:32 +0100

Dear Chris,
in -spmap- there is no direct way to represent spatial objects that are not defined in some proper dataset. Specifically, if 4 countries are not defined in your base map dataset "coord", then you cannot ask -spmap- to color them in blue, because for -spmap- there is nothing to color -- as indicated in the -spmap- help file, option ndfcolor() specifies the fill color of empty base map polygons, "empty" meaning that such polygons do exist but have no data attached. I guess that the only easy way to go is to have a base map that includes all the counties you would like to represent.
Best wishes,
Maurizio

 


Il giorno 16/gen/2012, alle ore 16.38, Stata Chris ha scritto:

> 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,
> Chris
> *
> *   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/


*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index