Skip to content

Instantly share code, notes, and snippets.

@juliuskittler
Last active October 27, 2019 11:31
Show Gist options
  • Select an option

  • Save juliuskittler/060bf6a6ec8304b6a996f7279b0259af to your computer and use it in GitHub Desktop.

Select an option

Save juliuskittler/060bf6a6ec8304b6a996f7279b0259af to your computer and use it in GitHub Desktop.
df = ggplot2::diamonds # data frame with 1 character or factor variable
ggplot(data = df, aes(x = cut)) +
geom_bar(fill = "steelblue4", alpha = 0.8) +
labs(title = "Number of Diamonds by Cut", y = "Count", x = "Cut") +
theme_bw() + theme(plot.title = element_text(hjust = 0.5))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment