Closed
Description
When setting the limits of scale_fill_steps()
, the fill brackets in the legend becomes unevenly spaced. It's not clear why or how this happens.
library(tidyverse)
df <- tibble(
crossing(
tibble(sample = paste("sample", 1:4)),
tibble(pos = 1:4)
),
val = runif(16)
)
ggplot(df, aes(x = pos, y = sample)) +
geom_line() +
geom_point(aes(fill = val), pch = 21, size = 7) +
scale_fill_steps(low = "white", high = "black")
ggplot(df, aes(x = pos, y = sample)) +
geom_line() +
geom_point(aes(fill = val), pch = 21, size = 7) +
scale_fill_steps(low = "white", high = "black", limits = c(0, 1))
Created on 2020-05-22 by the reprex package (v0.3.0)