We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In the current stable version, legend.key.height and legend.key.width work as expected:
legend.key.height
legend.key.width
packageVersion("ggplot2") # '3.5.2' library(ggplot2) p <- ggplot(mpg) + geom_point(aes(x = factor(cyl), y = displ, color = hwy)) + scale_color_fermenter(palette = "RdYlBu", direction = 1) + theme(legend.key.width = unit(0.25, "lines")) plots <- list( p + ggtitle("default"), p + ggtitle("0.5 lines") + theme(legend.key.height = unit(0.5, "lines")), p + ggtitle("2.5 lines") + theme(legend.key.height = unit(2.5, "lines")), p + ggtitle("null") + theme(legend.key.height = unit(1, "null")) ) cowplot::plot_grid(plotlist = plots)
But in the dev version, legend.key.height has no effect:
# in fresh session remotes::install_github("tidyverse/ggplot2") packageVersion("ggplot2") # '3.5.2.9000' library(ggplot2) # same plotting code as above
If theme(legend.direction = "horizontal"), then legend.key.height works OK but legend.key.width doesn't.
theme(legend.direction = "horizontal")
The same issue seems to affect continuous scales. Discrete scales seem to work OK but I didn't investigate extensively.
The text was updated successfully, but these errors were encountered:
Thanks for the report! I can reproduce the issue on my end.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
In the current stable version,
legend.key.height
andlegend.key.width
work as expected:But in the dev version,
legend.key.height
has no effect:If
theme(legend.direction = "horizontal")
, thenlegend.key.height
works OK butlegend.key.width
doesn't.The same issue seems to affect continuous scales. Discrete scales seem to work OK but I didn't investigate extensively.
The text was updated successfully, but these errors were encountered: