Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
zeehio opened this issue Oct 5, 2023 · 0 comments
Closed

Comments

@zeehio
Copy link
Contributor

zeehio commented Oct 5, 2023

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

zeehio added a commit to zeehio/plotly.R that referenced this issue Oct 5, 2023
zeehio added a commit to zeehio/plotly.R that referenced this issue Oct 5, 2023
zeehio added a commit to zeehio/plotly.R that referenced this issue Oct 5, 2023
zeehio added a commit to zeehio/plotly.R that referenced this issue Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant