[R] BarPlot

From: Mohsen Jafarikia <jafarikia_at_gmail.com>
Date: Mon 16 Oct 2006 - 18:24:53 GMT

Hello everyone:

I am using the following code to draw my barplot but it has two problems.


cols <- ifelse(Q!=0, "orange", "green")
Graph<- barplot(LR, main='LR Value',col=cols, border='black', space=0.05, width=(BL), xlab='Length', ylab='LR block',mar=c(5,1,4,2)) <<<<<<<<< axis(1, at=Graph, sprintf('%0.2f',BL))
mtext(1, at=Graph, text=ifelse(Q!=0, sprintf('%0.2f',Q), ""), line=2)
mtext(1, at=par('usr')[1], text='BL', line=1)
mtext(1, at=par('usr')[1], text='Var', line=2)
text(31,3.84,expression(paste(alpha==5,"%")),pos=3) <<<<< text(31,6.64,expression(paste(alpha==1,"%")),pos=3) <<<<<
  1. I don't know how to specify the margins. I have written it in the code but it is not working.
  2. I want the value of alph=5% at the right end of the line but it is almost in the left side and sometimes in the right side when I use the same code for drawing another barplot.

I appreciate any comments about these problems.


        [[alternative HTML version deleted]]

R-help@stat.math.ethz.ch 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. Received on Tue Oct 17 04:32:05 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 16 Oct 2006 - 21:30:10 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.