import library and dataset called diamonds

library(ggplot2)
data(diamonds)

creating a bargraph on the frequency and cuts of diamonds using the dataset

bar_graphs <-ggplot(diamonds,aes(x=cut,fill=color))+
geom_bar(postion="fill") +
  labs(
    x="cuts",
    y="frequency",
    fill="color")+
  theme_minimal()+
  scale_fill_brewer(palette="skyblue")
## Warning in geom_bar(postion = "fill"): Ignoring unknown parameters: `postion`
## Warning: Unknown palette: "skyblue"

disaplay the bargraph