Statalist The Stata Listserver


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

Re: st: -tmap- maps: why only 9 categories?


From   Maurizio Pisati <[email protected]>
To   [email protected]
Subject   Re: st: -tmap- maps: why only 9 categories?
Date   Wed, 23 Aug 2006 20:43:00 +0200

Dear Friedrich,
I originally chose to limit the maximum number of classes to 9 because most Brewer's graduated color palettes had a maximum of nine shades. However, I'm currently working on a completely rewritten version of -tmap- (which I will call -dmap-) that will allow a maximum of 16 different colors, depending on the specified classification method and color palette (no limit when option palette(Custom) is specified). -dmap- will also be more flexible and allow the user to draw more complex maps.
Best,
Maurizio


At 17.17 23/08/2006, you wrote:

Choropleth maps created with -tmap- from SSC are limited to 9
categories by default. Quote from the -tmap- help file: "clnumber(#)
specifies the number of classes k in which the variable of interest
quantvar should be divided. This option accepts only numbers between
2 and 9."

I had to create a map with 10 classes and was able to do so by
editing tmap_choropleth.ado in two places.

Line 103: change "if r(r) > 9" to "if r(r) > 10"
Line 110: change "inrange(`clnumber', 2, 9)" to "inrange(`clnumber',
2, 10)"

I can only think of aesthetic reasons for a limit on the number of
categories in a map. Is there also a technical reason for the 9-class
limit of -tmap-? Could raising this limit cause problems with -tmap-
or with Stata?

Friedrich Huebler

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index