Skip to content

strange behavior with the margin of legend.text for R3.5 #2943

@earthcli

Description

@earthcli

I have updated my R to version 3.5. There is too small margin for legend.text when using theme(legend.title=element_blank()), while it is normal without adding this line code.

require(ggplot2)
df <- reshape2::melt(outer(1:4, 1:4), varnames = c("X1", "X2"))
p1 <- ggplot(df, aes(X1, X2)) + geom_tile(aes(fill = value))
p1+scale_fill_continuous(guide = guide_legend())
# there is normal spacing (margin) for legend.text

p1+scale_fill_continuous(guide = guide_legend())+
  theme(legend.title=element_blank())
# there is too small spacing (margin) for legend.text

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions