Statalist The Stata Listserver


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

st: adding US state outlines using SPMAP


From   Julie Susan Darnell <[email protected]>
To   [email protected]
Subject   st: adding US state outlines using SPMAP
Date   Sat, 10 Mar 2007 18:41:13 -0600 (CST)

I attempted to execute the syntax kindly offered by Maurizio
Pisati, but the graph that resulted showed ONLY the outlines
of the states but with the correct legend (showing the custom
breaks 0 1 2 3 4 32 and selected color palette). It did not
display within each state outline the shaded cbsa/metro
areas.

use uscoordinates2
sort _ID
save uscoordinates2, replace
use usdatabase3
delimit;
spmap numberoffreeclinics if conterminous & type2=="metro"
using "uscoordinates2",
id(id) ndfc(white) fc(Blues) ocolor(gs12 ..) clmethod(custom)
clbreaks (0 1 2 3 4 32)
polygon(data(us-stateoutline.dta));

Note: uscoordinates2 is the base map with the x and y
coordinates for the cbsa metropolitan areas and us-
stateoutline is the base map with x and y coordinates for the
48 contiguous states. usdatabase3 contains the id,
numberoffreeclinics, type2, and conterminous variables.

Also (I'm not sure if this is relevant), the graphs that are
produced have very different shapes. The map of cbsa/metro
areas is stretched out and takes up the entire graph area and
the map of the US states is small and is positioned in the
upper lefthand corner. The US state map does not include
Alaska or Hawaii.

Any suggestions would be greatly appreciated.

Thank you,
Julie Darnell

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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