Statalist


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

st: Map with wrong colors


From   "Friedrich Huebler" <[email protected]>
To   [email protected]
Subject   st: Map with wrong colors
Date   Wed, 5 Sep 2007 18:05:24 -0400

When I draw a choropleth map with -spmap- from SSC, the regions have
the wrong colors. I define a variable called "key" with the values 1
to 6, recoded from a variable with the range 0 to 100 percent. 1 to 5
identify quintiles and 6 identifies regions with missing data. My
-spmap- command is shown below, with fill colors specified with RGB
values.

#delimit ;
spmap key using map.dta,
  id(id)
  clmethod(unique)
  fcolor("215 25 28" "253 174 97" "255 255 191" "171 217 233" "44 123
182" "225 225 225")
;

None of the regions have a value below 20 and none have a value
between 60 and 80, so that the first and fourth color in the list
above ("215 25 28" = dark red and "171 217 233" = light blue) should
not appear on the map. However, the map is drawn with the first three
colors from the fcolor list instead of the second, third and fifth
color. All regions with the value 2 are filled with the color "215 25
28", all regions with the value 3 are filled with the color "253 174
97", and all regions with the value 5 are filled with the color "255
255 191".

What am I doing wrong?

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