# 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))