Dear R users,
 
I need to draw a barplot with 2 Y axis. I have 3 days each of wich having 2 groups (and error bar for each of them). The height of the 3rd day is too tall compared to others. That's why I have to use a second Y axis for that. I am using  "barplot2" function of "gplots" library (to be able to add error bars as well). Data and  codes currently I am using is below. 
 
 
==================================================
 

means<-matrix(c(2.3, 2.0, 0.0, 3.0, 2.5, 40), nrow=2, byrow=TRUE)
SEM<-matrix(c(0.3, 0.2, 0.0, 0.4, 0.3, 10), nrow=2, byrow=TRUE)
 
CIL<-means-SEM
CIU<-means+SEM
rname<-c("Gr1", "Gr2")
cname<-c("day1", "day2", "day3")
rownames(means)<-rname
rownames(CIL)<-rname
rownames(CIU)<-rname
colnames(means)<-cname
colnames(CIL)<-cname
colnames(CIU)<-cname
 
library(gplots)
     
barplot2(means, beside = TRUE, angle = c(30, 45), density = c(-1, 10),
        col = c("white", "black"),
        #legend = rname[1], 
        ylim = c(0, 5), cex.axis=2, ylab="Frequency)", cex.lab=2, 
        ci.lwd=2, grid.lwd =2, 
        cex.names = 1.7, plot.ci = TRUE, ci.l = CIL, ci.u = CIU,
        plot.grid = TRUE)
        
    legend("topleft", legend=rname, fill = c("white", "black"), 
       border="black", 
       angle = c(30, 45), density = c(-1, 10),
       col = c("white", "black"), 
       bty = "o", bg = par("bg"),
       box.lwd = par("lwd"), box.lty = par("lty"), box.col = par("fg"),
       pt.bg = NA, cex = 2, pt.cex = cex, pt.lwd = lwd,
       xjust = 0, yjust = 1, x.intersp = 1, y.intersp = 1,
       adj = c(0, 0.5), text.width = NULL, text.col = par("col"),
       plot = TRUE, ncol = 1, horiz = FALSE, title = NULL,
       inset = 0,  
       title.col = text.col, title.adj = 0.5,
       seg.len = 2)
       box()
  
================================================
 
 
 
 
 
 
 
 
 
 
Any help regarding adding second Y axis 

------------------------------------------------------------------------
Dr. Seyit Ali KAYIS
Selcuk University, Faculty of Agriculture
Kampus/Konya, Turkey



Tel: +90 332 223 2830 Mobile: +90 535 587 1139


Greetings from Konya, Turkey
http://www.ziraat.selcuk.edu.tr/skayis/
------------------------------------------------------------------------
 
Any help regarding adding second Y axis is deeply apprecited.
 
Kind Regards
 
Seyit Ali
	[[alternative HTML version deleted]]

