Skip to content

legend.byrow = TRUE doesn't seem to be working #5661

Closed

Description

@Gen4536

Hello

I'm using the 3.4.4900 version of ggplot2 and the legend.byrow argument doesn't seem to be working as expected. I added the argument in both theme and guides but it makes no difference if you add it in only one of them or both (or none I guess).

df <- data.frame(x = 1:20, y = 1:20, color = letters[1:20])
ggplot(df, aes(x, y)) +
    geom_point(aes(colour = color)) +
    theme(
        legend.byrow = TRUE
    ) +
    guides(col = guide_legend(nrow = 8, byrow = TRUE))

Expected behaviour
guide_legend-10
Actual behaviour
image

Activity

  1. teunbrand commented on Jan 25, 2024

    @teunbrand
    Collaborator

    Hi there, thanks for the report! I can confirm this is not working as intended.

  2. added this to the ggplot2 3.5.0 milestone on Jan 25, 2024
  3. added
    bug
    on Jan 25, 2024
  4. teunbrand commented on Jan 30, 2024

    @teunbrand
    Collaborator

    Considered fixed by #5662.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions