Hello,
R 2.3.0
Windows XP

I have spent quite a bit of time trying to resolve my problem below, which included a R site search.

The "vertical bars" syntax below produces a vertical bar chart with the values displayed above each bar. I want to cast this graphic horizontally, but I have not been able to arrive at a suitable outcome. The best I have been able to do, using the second block of syntax below, is to get the values to display along the right edge of the horizontal graph whereas my goal is to have them displayed just off the ends of each horizontal bar, as they are on the veritical graph.

I was hoping someone could provide me with direction or a solution to this problem. 

#Vertical bars syntax:
math.bar <- c(53,31,55,28,55,100)
names(math.bar) <- c('Grade \n 3','Grade \n 4','Grade \n 5','Grade \n 6','Grade \n 7','Grade \n 8')
o <- rev(order(math.bar))
math.bar <- math.bar[o]
par(ps=10)
math.barplot <- barplot(math.bar, main = list("Death Rates in Virginia", font = 1), col=c('darkblue'), names=c('Grade \n 3','Grade \n 4','Grade \n 5','Grade \n 6','Grade \n 7','Grade \n 8'), ylim=c(0,100), ylab="Percentage", xlab="Grade Level")
text(math.barplot, math.bar+5, math.bar, xpd = TRUE)

#Horizontal bars syntax:
par(mar=c(5, 9, 5, 2))
math.bar <- c(53,31,55,28,55,100)
names(math.bar) <- c('Grade 3','Grade 4','Grade 5','Grade 6','Grade 7','Grade 8')
o <- rev(order(math.bar))
math.bar <- math.bar[o]
par(ps=10)
math.barplot <- barplot(math.bar, horiz=T, las=2, main = list("Death Rates in Virginia", font=1), col=c('darkblue'), xlim=c(0,100), ylab="Grade Level", xlab="Percent")
mtext(side=4, at=math.barplot, math.bar, las=2)
Thank you,

Greg Blevins
The Market Solutions Group


	[[alternative HTML version deleted]]


