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]

st: spmap


From   "Lynn Lee" <[email protected]>
To   <[email protected]>
Subject   st: spmap
Date   Sat, 22 Sep 2012 18:40:52 +0800

Dear  Prof. Pisati,

The -spmap- I used is the program written by you. 
I appreciate for your reply. I still have one more question. It looks like
command "generate x = runiform()>0.5" assigns 0 or 1 randomly to each
region. I tried the command you suggested, but there are other regions(not
the region I want to color) also have the values fall into the range of
"<0.5". How to exclude them? If I want to choose the region I want(not
randomly) and to color them, how to do that? 

I appreciate for your help.

Best Regards,
Lynn Lee

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Maurizio Pisati
Sent: Saturday, September 22, 2012 3:17 PM
To: [email protected]
Subject: Re: st: spmap

Dear Lynn,
the following example, using datasets distributed with -spmap-, might be of
help for drawing the map you're looking for:

. use "Italy-RegionsData.dta", clear
. generate x = runiform()>0.5

. spmap x using "Italy-RegionsCoordinates.dta", id(id)   ///
  clmethod(unique) fcolor(white green)                   ///
  label(label(region) xcoord(xcoord) ycoord(ycoord)      ///
  size(*.6) pos(0) angle(50)) 


Best wishes,
Maurizio



Il giorno 22/set/2012, alle ore 08.42, Lynn Lee ha scritto:

> Dear all,
> 
> I am now using -spmap- drawing map.  When I write the following commad:
> spmap x using " map.dta", ///
>  id(id) label(label(ename)  ///
>  xcoord(x_coord) ycoord(y_coord) size(*.6) ///
>  pos(0) angle(50))
> 
> The Stata11 generates the map and automatically color every region on 
> the map.
> So, I use "fcolor(white)" to set base map color to be white. But I 
> only want to color several regions(not every region) on the map to be 
> green. Which command is useful?
> 
> Any suggestion is appreciated.
> 
> Best Regards,
> Lynn Lee
> 
> 
> *
> *   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/

*
*   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