Closed
Description
This reprex actually comes from the current ggplot2 3.4.4 docs for guide_colorsteps
, where it is visible:
df <- expand.grid(X1 = 1:10, X2 = 1:10)
df$value <- df$X1 * df$X2
p <- ggplot(df, aes(X1, X2)) + geom_tile(aes(fill = value))
# By default each bin in the guide is the same size irrespectively of how
# their sizes relate in data space
p + scale_fill_binned(breaks = c(10, 25, 50))
# This can be changed with the `even.steps` argument
p + scale_fill_binned(
breaks = c(10, 25, 50),
guide = guide_coloursteps(even.steps = FALSE))
When I run this code on ggplot 3.4.4, I can't see the faint lines at low-resolution outputs, but if I run, ggsave at, say, width = 1920, height = 1080, units = 'px'
, or with SVG output, they're definitely visible. Mapping colour
to the same variable as fill
hides the lines from the tiles themselves but not from the colour bar (unless there's a way to merge the fill and colour guides rather than hiding one?).