Skip to content
Prev 131726 / 398502 Next

Barchart, Pareto

--- "Kapoor, Bharat " <k at chicagogsb.edu> wrote:

            
You might want to have a look at the qcc package. See 
http://www.stat.unipg.it/~luca/Rnews_2004-1-pag11-17.pdf
for some information
 Following is the approach
Given the lenght of the names you may have a problem. 
?mtext is the obvious way but the names are too long. 
Have a look at
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/80007.html
for rotating the labels or use the staxlab function in
plotrix (see below)
library(plotrix)
bp <- barplot(x$Percent, space=0,
names.arg=x$ReasonCode, main="Pareto",
 legend.text=x$ReasonCode, ylab="% error", col=1:5,
ylim=c(0,50), xaxt="n")
 staxlab(side=1, 1:6, x[,3])
?text