Dear all,

I would like to produce a map with information about the patenting
activity in German districts, by coloring districts with different
degrees of patenting activity in different colors. I work with the
packages maptools, maps and spdep. The map data is read from an external
.shp file (+ the corresponding .shx and .dbf files). Plotting a map with
the IDs or the patenting indicator itself works fine. But coloring the
map leads to completely odd results (wrong colors for most of the
regions). I also tried simpler values (just 0 and 1 for different
regions), same problem. I tried to check whether there is any problem
with the match of data and district ids, but everything seemed to be
fine. 

Sample code: 
****************
brks.pat<-quantile(patenting$patbus)
#palette.pat<-c("green", "blue", "grey", "darkgrey", "red")
palette.pat<-c(rep("green", 4), "red")
plot(iab7.poly, col=palette.pat[findInterval(patenting$patbus,
brks.pat)])
legend(1200, -200, fill=palette.pat, legend=round(brks.pat,2), cex=0.6)
title(main="patenting activity in german districts")

Data:
******
Iab7.poly contains the polygons of 343 German districts
patenting$patbus contains the number of corporate patents per 100.000
inhabitants for each district

Any ideas would be appreciated!

Best regards,
Katharina



******************************

Katharina Frosch
Rostock Center for the Study of Demographic Change
Konrad-Zuse-Str. 1
18057 Rostock
Tel.: (0381) 2081-148
Fax: (0381) 2081-448
Mail: frosch@rostockerzentrum.de 






----------
This mail has been sent through the MPI for Demographic Rese...{{dropped}}

