更改图例标题并增加密钥大小
# load the library
library(ggplot2)
# create a blank canvas
g <- ggplot(data = diamonds)
g + geom_bar(aes(x = cut, fill = cut)) + 
    scale_fill_discrete(guide = guide_legend(title = "CUT", 
                                             keywidth = 2, 
                                             keyheight = 2))