On Sat, 14 Jun 2014 12:57:12 PM you wrote: > Hi Jim, > > I tried your fix. > > This one works: > barp(c(2,3,4,5,6,7,8), ylim=c(-10,10)) > > This one fails: > barp(c(2,3,4,5,6,7,8)) > > Regards, > Pascal > Hi Pascal, Right again. This seems to work for both and I think handles the problem correctly:
if(is.null(ylim)) { negy<-any(height<0,na.rm=TRUE) if(negy) miny<-min(height,na.rm=TRUE)*1.05 else miny<-ifelse(ylog,min(height)/10,0) ylim<-c(miny,max(height,na.rm=TRUE)*1.05) } else { miny<-ylim[1] negy<-miny<0 } Remove the line: negy<-any(height<0,na.rm=TRUE) and modify the succeeding conditional clause as above. This will appear in version 3.5-8. 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.