Skip to content

geom_point with fill and colour gives warning and fills wrongly the values  #2298

@zeehio

Description

@zeehio

The following code does not give a green and a red dot in plotly, but it does in ggplot2. The ggplot2 behaviour is correct.

library(plotly)
  df <- data.frame(x = c(1,2), y = c(0,0), color = rep("yellow", 2), fill = 1:2)
  p <- ggplot(df) +
    geom_point(aes(x = x, y = y, fill = fill, color = color), size = 5, shape = 21) +
    scale_fill_gradient(low = "green", high = "red")
ggplotly(p)

PR on its way

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions