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

lines don't respect colorbar limits in 3D scatter #1236

Closed
mschilli87 opened this issue Apr 16, 2018 · 2 comments
Closed

lines don't respect colorbar limits in 3D scatter #1236

mschilli87 opened this issue Apr 16, 2018 · 2 comments
Labels

Comments

@mschilli87
Copy link

If one creates a 3D scatter with markers and lines, both can be colored by one
dimension. However, when manually overwriting the colorbar limits only the
markers respond. This leads to completely wrong values indicated by the lines:

library(plotly)

test.plot <- mtcars %>%
  plot_ly(x = ~hp, y = ~cyl, z = ~mpg, color = ~mpg,
  type = "scatter3d", mode = "lines+markers")

# Note how the line changes color with the markers it passes through:
test.plot

# Note how the marker color matches the data and colorbar while the line
# ignores the limits and uses the original colors:
test.plot %>%
  colorbar(limits = c(0, 100))

default limits
adjusted limits

@cpsievert cpsievert added the bug label Apr 16, 2018
@mschilli87
Copy link
Author

Does anyone have an idea where the problem is lying? From an outside perspective this looks like a trivial bug but I guess we can agree that's typically a good indication that it's actually more tricky. 😉
For the time being a work-around would be welcome, too. In my case, I only use lines and I need to adjust the colorbar to compare different plots. Currently, this renders the whole application useless as the colors in the plots either don't match the same values or worse, not at all. If I can help I'm absolutely willing to do so.

@mschilli87
Copy link
Author

Wow that was fast. Works like a charm. 🎉 Thank you a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants