Hello everyone,
I have the following program to draw a barplot.
MP<-read.table(file='AR.out')
names(MP)<-c('BN','BL','LR','Q')
Graph<- barplot(MP$LR, main='LR Value', col='orange', border='black', space=
0.05, width=(MP$BL), xlab='Length', ylab='LR each')
axis(1, at=Graph, sprintf('%0.2f',MP$BL))
mtext(1, at=Graph, text=sprintf('%0.2f',MP$Q), line=2)
mtext(1, at=par('usr')[1], text='BL', line=1)
mtext(1, at=par('usr')[1], text='Var', line=2)
abline(h=3.841,col='blue')
abline(h=6.635,col='red')
I have two more questions about the graph that I have:
1) I want to write the 'Q' only when it is not equal to zero.
2) I would like to change the bars when 'Q' is not zero. For example, from
orange to green.
I would appreciate your input to this question.
Thanks,
Mohsen
[[alternative HTML version deleted]]
______________________________________________
[email protected] 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.