On 11/14/2011 05:59 PM, Prasanth V P wrote:
require(plotrix)
xy.pop<- c(17,15,13,11,9,8,6,5,4,3,2,2,1,3)
xx.pop<- c(17,14,12,11,11,8,6,5,4,3,2,2,2,3)
agelabels<- c("0-4","5-9","10-14","15-19","20-24","25-29","30-34",
"35-39","40-44","45-49","50-54","55-59","60-64","65+")
xycol<-color.gradient(c(0,0,0.5,0.15),c(0.25,0.5,0.5,1.75),c(0.5,1.5,1,0),18)
xxcol<-color.gradient(c(0,1,0.5,1),c(0.25,0.5,0.5,1.25),c(0.5,0.25,0.5,1.5),18)
par(mar=pyramid.plot(xy.pop,xx.pop,labels=agelabels, labelcex=1.125,
main="Population Pyramid -- Malawi", xycol=xycol,
xxcol=xxcol))
Hi Prasanth V P,
Just a typo. Try this:
par(mar=pyramid.plot(xy.pop,xx.pop,labels=agelabels,labelcex=1.125,
main="Population Pyramid -- Malawi", lxcol=xycol,rxcol=xxcol))
Nice plot.
Jim
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.