I would like to have dollar amounts on the y-axis with a dollar sign ($) and 2 trailing zeros to indicate cents (for example, $1.00).
I have the following code and the resultant plot.
library(ggplot2)
library(scales)
df <- data.frame("x" = c("A1",
"A2",
"A3"),
"y" = c(0.77,5.42,8.06))
ggplot()+
geom_bar(data=df, aes(x, y), stat="identity")+
theme_minimal()+
scale_y_continuous(minor_breaks = seq(0 , 9, 1.00),
breaks=c(seq(0,9,1.00)),label=dollar,
expand = c(.01, 0), limits = c(0, 9))


