Skip to content

Barchart, Pareto

3 messages · Kapoor, Bharat, Uwe Ligges, John Kane

#
Kapoor, Bharat wrote:
Well, either reduce the size of that kind of text (see "cex.axis" in 
?par) or enlarge the corresponding margins (see "mar" in ?par)
See "col" in ?barplot
See "ylim" in ?barplot
See the values barplot() returns and combine them with a call to text().


Can you please read the help pages (and the posting guide) before 
posting? At least two of your questions are directly answered in 
?barplot and the others by a help page ?barplot refers to: ?par.

Uwe Ligges
1 day later
#
--- "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