Statalist The Stata Listserver


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

st: second tmap question


From   Scott Cunningham <[email protected]>
To   [email protected]
Subject   st: second tmap question
Date   Mon, 2 Oct 2006 17:02:00 -0400

I'm having some trouble forcing -tmap- to create a certain number of classes for my variable of interest, sr. Because I am creating two maps - one for blacks and one for whites - I want the legend and the corresponding map to use the same number of classes, and the same class ranges. So, for instance, I'd like for the map to use 7 different colors depending on whether sr falls within these 6 bands:

[0 75] [75 90] [92 100] [100 108] [108 120] [120 200]

. tmap choropleth sr if id!=13 & id!=56, id(id) map(uscoord.dta) palette(Blues) title(`"`"Black 18-24 year-old Americans"'"') subtitle ("Ratio of Females-to-Males")legpos(5) legtitle("Sex Ratio") addplot (label STATE if id!=13 & id!=56, x(LON) y(LAT) ls(0.75)) clbreaks(0 75 92 100 108 120 200) clnumber(6)

The output for the map does not do what I intended, though. The legend shows 6 classes, but the ranges are:

[18.94 87.72] [87.72 106.03] [106.03 115.94] [115.94 120.05] [120.05 124.48] [124.48 178.02]

Is something wrong my syntax? I'm reading over the user guide here, and the only thing else I could do would be to specify -clmethod (unique)-. Yet, when I do this, I get an error telling me "sr has too many values".


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