[R-sig-Geo] fancy-ing up a readShapePoly plot

K. Grace whatchawhatcha at yahoo.com
Sat Apr 5 07:27:03 CEST 2008


Hi,

I am very bad at this!  Anyway, I have plotted my data using readShapePoly and have a lovely outline of a country with 8 geographic regions.  I would like to place a barplot in the center of each region.  I have no idea how to create a barplot without overwriting the readShapePoly plot.
Here is the barplot code I am trying to use:

tN <- table(Ni <- rpois(100, lambda=5))
r <- barplot(tN, col=rainbow(20))
#- type = "h" plotting *is* 'bar'plot
lines(r, tN, type='h', col='red', lwd=2)

Any suggestions are greatly appreciated!  

Thanks,
Kat







      ____________________________________________________________________________________
[[elided Yahoo spam]]




More information about the R-sig-Geo mailing list