-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
featurea feature request or enhancementa feature request or enhancementguides 📏visual change 👩🎨Rendering change that will affect look of outputRendering change that will affect look of output
Description
see this issue: wilkelab/cowplot#152 (reprex included)
the key height gets stretched when using multiline key-labels OR bigger text size in the legend. this is not affected my manipulations of the key height in theme() or guides() - is this intended behavior?
The reprex from wilkelab/cowplot#152 (comment):
require(ggplot2)
#> Loading required package: ggplot2
set.seed(15)
df <- data.frame(x=1:50, y=rnorm(50, 10, 2), var=rep(c("A","B","C","D","E"),10))
labs = c("A oneline","B oneline","C oneline", "D\ntwolines","E\ntwolines")
cols = c('#e41a1c','#377eb8','#4daf4a','#984ea3','#ff7f00')
ggplot(df) +
geom_ribbon(aes(x=x, ymin=y-1, ymax=y+1, fill=var), alpha=0.3) +
geom_line(aes(x=x, y=y, colour=var), alpha=0.3, size=2) +
scale_fill_manual(values=cols, labels = labs) +
theme(legend.position="bottom",
legend.title = element_blank(),
legend.text = element_text(size = 14)) +
guides(fill=guide_legend(ncol=3, byrow=TRUE))
gfspiteri, alirezt and Nova-Scotia
Metadata
Metadata
Assignees
Labels
featurea feature request or enhancementa feature request or enhancementguides 📏visual change 👩🎨Rendering change that will affect look of outputRendering change that will affect look of output