Puts legend keys on top and bottom of colorbar
I have plots with gradient colourbar, that the numbers don't really mean anything, just the relative amount does, so I replaced the tick text with descriptions. However, ggplot2 puts legend text next to vertical colourbar, but is there a way to add text to top and bottom natively in ggplot, other than turning off text in the legend and adding with annotate() (and having to turn clipping off)? What I get vs. what I want I'm sure I'm missing something simple. Code that gives me typical colourbar behaviour: df <- tibble(A = letters[1:5], B = 1:5) ggplot(df, aes(x = A, y = B, fill = B)) + geom_col
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.