Skip to content

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

@Ari04T

Description

@Ari04T

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions