Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: adding US state outlines using SPMAP

From   "Austin Nichols" <>
Subject   Re: st: adding US state outlines using SPMAP
Date   Mon, 12 Mar 2007 10:54:08 -0500

Julie Darnell--
You can check Maurizio's theory by looking at the range of coordinates
and redefining them as necessary, e.g.:
use uscoordinates2
su _X
local xmax=r(max)
local xmin=r(min)
su _Y
local ymax=r(max)
local ymin=r(min)

use us-stateoutline.dta
su _X
replace _X=(_X-r(min))*(`xmax'-`xmin')/(r(max)-r(min))+`xmin'
su _Y
replace _Y=(_Y-r(min))*(`ymax'-`ymin')/(r(max)-r(min))+`ymin'
save rev-stateoutline

On 3/12/07, Maurizio Pisati <> wrote:
I tried to apply a similar syntax to the example datasets:

use Italy-RegionsData.dta
spmap relig1 using Italy-RegionsCoordinates.dta, id(id) ndfc(white)
fc(Blues) ocolor(gs12 ..)  ///

and I seem to get what you're looking for.
Given your description, it sounds like your maps are expressed in different
coordinate systems, so that they cannot be properly combined. Just a guess,

At 01.41 11/03/2007, Julie Darnell wrote:
>I attempted to execute the syntax kindly offered by Maurizio
>Pisati, but the graph that resulted showed ONLY the outlines
>Any suggestions would be greatly appreciated.
*   For searches and help try:

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