You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my use of the newer version of ggplot2 (version3.5.1), I found that I can't set the position for guide_colorstep individually, but only through the global theme's legend.position.
I'm not sure if this is intentional or not, but I think it doesn't follow the logic of guides as a whole. Here's a simple example:
library(ggplot2)
# position not working of guide_colorsteps
p1 <- ggplot(mpg, aes(displ, hwy, colour = cty)) +
geom_point() +
guides(color=guide_colorsteps(position = "bottom"))
# position working of guide_colorbar
p2 <- ggplot(mpg, aes(displ, hwy, colour = cty)) +
geom_point() +
guides(color=guide_colorbar(position = "bottom"))
# global theme’s legend.position setting
p3 <- ggplot(mpg, aes(displ, hwy, colour = cty)) +
geom_point() +
guides(color=guide_colorsteps()) +
theme(legend.position = "bottom")
patchwork::wrap_plots(p1, p2, p3)
The text was updated successfully, but these errors were encountered:
In my use of the newer version of ggplot2 (version3.5.1), I found that I can't set the
position
forguide_colorstep
individually, but only through the global theme'slegend.position
.I'm not sure if this is intentional or not, but I think it doesn't follow the logic of
guides
as a whole. Here's a simple example:The text was updated successfully, but these errors were encountered: