How can I change the Y-axis figures into percentages in a barplot?

STAT picture STAT · Dec 11, 2014 · Viewed 148.5k times · Source

How can we change y axis to percent like the figure? I can change y axis range but I can't make it to percent. enter image description here

Answer

luchonacho picture luchonacho · Dec 12, 2016

Use:

+ scale_y_continuous(labels = scales::percent)

Or, to specify formatting parameters for the percent:

+ scale_y_continuous(labels = scales::percent_format(accuracy = 1))

(the command labels = percent is obsolete since version 2.2.1 of ggplot2)