-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Description
The following example is to illustrate my obsessive feature request. As you see, there is a small amount of padding between the first (or the last) legend tick and legend frame. How could I remove those paddings and make the first or the last legend ticks at the edge of legend frame?
Is there also an expand
parameter available for colorbar scales?
Brief description of the problem
library(ggplot2)
p <- ggplot(mtcars, aes(hp, disp, color = mpg)) +
geom_point() +
scale_color_continuous(limits = c(10, 35),
breaks = seq(10, 35, by = 5),
guide = guide_colorbar(
direction = "horizontal",
title.position = "top",
title.hjust = 0.5,
ticks.colour = "white",
frame.colour = "black",
barwidth = 12)) +
theme(legend.position = "top")
p
Created on 2019-06-01 by the reprex package (v0.3.0)
Metadata
Metadata
Assignees
Labels
No labels