Skip to content

Make ggplotly respect override.aes in guide_legend #989

Open
@talgalili

Description

@talgalili

A short example:

library(ggplot2)
p <- ggplot(economics_long, aes(date, value01, colour = variable)) +
  geom_line(size = .5) + 
  guides(colour = guide_legend(override.aes = list(size = 2)))
p

Notice the thicker lines in the legend on the right

image

However, this new element is ignored in ggplotly:

ggplotly(p)

image

This becomes even more critical when using a very low level of alpha, and then needing to adjust it for the legend.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions