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
From 
 
Scott Merryman <[email protected]> 
To 
 
[email protected] 
Subject 
 
Re: st: question about spmap 
Date 
 
Wed, 25 Aug 2010 13:41:36 -0500 
Can you replicate this problem using the -spmap ancillary- datasets?
Both the maps in the example below produce regional borders:
use "Italy-RegionsData.dta", clear
spmap using "Italy-RegionsCoordinates.dta", id(id) name(gr1,replace)
	
spmap using "Italy-RegionsCoordinates.dta", id(id)                 ///
   point(data("Italy-RegionsData.dta") xcoord(xcoord)               ///
   ycoord(ycoord)  fcolor(red) size(*1.5)) ///
   name(gr2,replace)
Another way is to use the -polygon()- option
use "Italy-OutlineData.dta", clear
spmap using "Italy-RegionsCoordinates.dta", id(id)                 ///
	point(data("Italy-RegionsData.dta") xcoord(xcoord)               ///
        ycoord(ycoord)  fcolor(red) size(*1.5)) ///
	polygon(data("Italy-RegionsCoordinates.dta"))
Scott
On Wed, Aug 25, 2010 at 1:11 PM, Maria Ana Vitorino
<[email protected]> wrote:
> Dear StataList users,
> I have a question regarding spmap.
> If I do
> spmap using pt-c, id(id)
> then I get a simple map with all the boundaries for the different regions,
> which is ok.
> But, as soon as I add some point data (from another file) the boundaries
> disappear.
> For example, when I do:
> spmap using pt-c, id(id) point(data("points.dta") xcoord(xcoord)
> ycoord(ycoord) fcolor(blue) )
> only the points show up, not the boundaries for the regions.
>
> How can I have both the boundaries of the regions and the point data?
>
> Thanks for the help,
>
> 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/