library(ggplot2)
ggplot(diamonds) +
aes(y = clarity, fill = cut) +
geom_bar(position = "likert") +
scale_x_continuous(label = label_percent_abs()) +
xlab("proportion")
ggplot(diamonds) +
aes(y = clarity, fill = cut) +
geom_bar(position = "likert") +
scale_x_continuous(label = label_percent_abs()) +
xlab("proportion") +
scale_fill_likert()
ggplot(diamonds) +
aes(y = clarity, fill = cut) +
geom_bar(position = position_likert(cutoff = 1)) +
scale_x_continuous(label = label_percent_abs()) +
xlab("proportion") +
scale_fill_likert(cutoff = 1)
Run the code above in your browser using DataLab