Skip to content
Prev 319597 / 398506 Next

column and line graphs in R

On 03/15/2013 01:40 AM, Gian Maria Niccol? Benucci wrote:
Hi Gian,
You can do this in twoord.plot like this (data is named "nat_af" and the 
first column is labeled "label"):

twoord.plot(1:22-0.2,nat_af$rel.abund,1:22+0.2,nat_af$rel.freq,
  type=c("bar","bar"),lylim=c(0,0.19),rylim=c(0,0.43),halfwidth=0.2,
  main="Abundance and frequency",ylab="Abundance",rylab="Frequency",
  xticklab=rep("",22))
staxlab(1,at=1:22,labels=nat_af$label,cex=0.8,srt=45)

Jim