I have the following codes running in R:
options(scipen=99)
sp <- ggplot(mydata2, aes(x=FY, y=PkgRev, fill=FY, label=PkgRev)) + geom_bar(stat = "identity") +
geom_text(aes(label=PkgRev),size=3,position=position_dodge(width=0.9),vjust=-0.50)
sp
sp + facet_grid(Market ~ PropertyCode) +
theme(axis.title.x=element_blank(),
axis.text.x=element_blank(),
axis.ticks.x=element_blank(),
axis.title.y=element_blank()) +
theme(legend.position="bottom") +
theme(legend.title=element_blank()) +
ggtitle('xxxxxxxx') +
scale_y_continuous(breaks = seq(0, 170100000, by=50000000), limits=c(0,170100000))
The above codes give me the following output (extract shown):
I want the y-axis tick values to be separated by a comma to represent thousands and the same principle on the text showing the values on top of the bars.
How do I achieve this?