# Why is the y-axis in this R plot showing invalid percentage values?

Why are the percentages in the y-axis of this bar chart displayed incorrectly (values larger than 100%) and how can I fix it?

qplot(tctype,tccount,data=categ,xlab="Type",ylab="",geom = "bar")+ scale_y_continuous(formatter="percent")


This is the data frame

categ
tctype tccount
1  inthread (10 or less)   16228
2 occasional (10 to 100)    3561
3 addicted (100 to 1000)     327
4        communal(1000+)      10

-
Maybe try qplot(tctype,tccount/sum(tccount),data=categ,xlab="Type",ylab="",geom = "bar")+ scale_y_continuous(formatter="percent") –  mark999 Jun 18 '11 at 6:35
It's displaying it correctly, 16228 = 1622800%, you'll have to normalize the data yourself as suggested. –  nico Jun 18 '11 at 8:06
I see, I thought the formatter part would do it automatically. This is exactly what I needed. Thanks a lot! –  amh Jun 19 '11 at 16:46
plot(tctype,tccount/sum(tccount),data=categ,xlab="Type",ylab="",geom = "bar")+ scale_y_continuous(formatter="percent")