By default, ggplot2
shows two ticks on each side of the legend (see image below). Is there a way to show a full line instead of separated ticks?
Reprex with default ticks of ggplot2
library(ggplot2)
df <- data.frame(x = 1, y = 1:3, z = 1:3)
ggplot(df, aes(x, y)) +
geom_raster(aes(fill = z)) +
scale_fill_continuous(guide = guide_colorbar(
ticks.colour = "red",
ticks.linewidth = 2,
barwidth = 2
)
)