Confused with an error message related to "plotrix" library in the newer versions of R.
Hi Jim, It's working perfectly fine with the "rxcol" parameter. I am just wondering how could I miss that..!!! By the way, many thanks for pointing it out... Otherwise, I would have been using the old version of R for just getting the required plot. Much Appreciated, Prasanth. -----Original Message----- From: Jim Lemon [mailto:jim at bitwrit.com.au] Sent: 14 November 2011 13:39 To: Prasanth V P Cc: r-help at r-project.org Subject: Re: [R] Confused with an error message related to "plotrix" library in the newer versions of R.
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