Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
iris %>%
group_by(Species) %>%
summarize(mean_petal_width = mean(Petal.Width)) %>%
ungroup() %>%
ggplot(aes(Species, mean_petal_width,
fill = Species)) +
geom_col(show.legend = FALSE) +
theme_ipsum() +
scale_fill_manual(values = c("setosa" = "lightgray",
"versicolor" = "lightgray",
"virginica" = "red")) +
labs(x = NULL,
y = NULL,
title = "<span style = 'color: red;'>Virginica irises</span> have the largest average sepal width") +
theme(plot.title = element_markdown())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment