排序
- reorder()
p <- ggplot(data = my.df, aes(x = reorder(type, value), y = value)) +
geom_bar(stat = "identity")

- 使用scale_x_discrete()達到反向排序的效果
p + scale_x_discrete(limits = rev)

調整寬度
geom_bar()中的width參數
p <- ggplot(data = my.df, aes(x = type, y = value)) +
geom_bar(stat = "identity", width = 0.5)

調整顏色
geom_bar()中的fill參數
p <- ggplot(data = my.df, aes(x = type, y = value)) +
geom_bar(stat = "identity", fill = "#6ab04c")

標示文字
geom_text()
p <- ggplot(data = my.df, aes(x = type, y = value)) +
geom_bar(stat = "identity") +
geom_text(aes(label = value), vjust = -0.3, size = 5.5) +
ylim(c(0, 8))
