Skip to content

Instantly share code, notes, and snippets.

@ayoskovich
Created December 14, 2021 16:04
Show Gist options
  • Save ayoskovich/f19625fead44b00c118125ca657b1b42 to your computer and use it in GitHub Desktop.
Save ayoskovich/f19625fead44b00c118125ca657b1b42 to your computer and use it in GitHub Desktop.
Style the legend in ggplot
df %>%
ggplot(aes(x, y, color=foo))+
geom_count()+
# Remove legend for only the size aesthetic
scale_size(guide = 'none')+
# Increase legend point size
guides(colour = guide_legend(override.aes = list(size=5)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment