
From  Maurizio Pisati <maurizio.pisati@galactica.it> 
To  statalist@hsphsun2.harvard.edu 
Subject  Re: st: tmap question 
Date  Mon, 02 Oct 2006 22:29:00 +0200 
I'm using tmap 2.0 and had a question about the addplot() command. I
have a variable called "sr" which is the ratio of women to men at the
United States state level. I would like to have added to the map the
abbreviation for each of the United States states. I appear to be
having trouble with the xplot and yplot syntax within addplot. For
instance, here is the simple map I've made without the addplot.
tmap choropleth sr if id!=13 & id!=56, id(id) map(uscoord.dta) palette (Blues) title(`"`"Sex Ratios for 1824 yearolds, 2000"'"') subtitle ("White Americans")
I would like to now add the state abbreviation to the map, making it
easier to interpret. I'm reading a user guide written by Maurizio
Pisati, and he writes that addplot requires the x and ycoordinates
of the variable name. Contained in uscoord.dta are 3 variables:
_ID, _X and _Y. So I type the following:
tmap choropleth sr if id!=13 & id!=56, id(id) map(uscoord.dta) palette (Blues) title(`"`"Sex Ratios for 1824 yearolds, 2000"'"') subtitle ("White Americans") addplot(label sr if id!=13 & id!=56, x(X) y(Y))
But this elicits an error, saying that the syntax for addplot is
incorrect. I am assuming that the problem lies with the use of the
x and ycoordinates. And reading through Dr. Pisati's user guide
more closely, I notice in an example that his x and ycoordinates
appear to be in the main using file  not in his coordinates file.
Here's the variables I have for me main file:
STATE
NAME
FIPS
LON
LAT
id
fip
sr
Any help is appreciated.
*
* 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/
* * 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–2016 StataCorp LP  Terms of use  Privacy  Contact us  What's new  Site index 