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

Greg Snow Greg.Snow at imail.org
Mon Apr 7 17:54:26 CEST 2008


Look at the subplot function in the TeachingDemos package, one of the
examples shows adding barplots to a map.

Hope this helps,

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
(801) 408-8111
 
 

> -----Original Message-----
> From: r-sig-geo-bounces at stat.math.ethz.ch 
> [mailto:r-sig-geo-bounces at stat.math.ethz.ch] On Behalf Of K. Grace
> Sent: Friday, April 04, 2008 11:27 PM
> To: r-sig-geo at stat.math.ethz.ch
> Subject: [R-sig-Geo] fancy-ing up a readShapePoly plot
> 
> 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]]
> 
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> 




More information about the R-sig-Geo mailing list