-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Error bars not inheriting color #3392
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
Comments
@nicolaskruchten Could you please test this. I think a similar issue may be existed with 2D error bars? Plotly.newPlot(gd, { "data": [ { "x": [0, 1, 2, 3, 4], "y": [1, 2, 4, 8, 16], "marker": { "width": 5 }, "type": "scatter", "mode": "markers+lines", "error_y": { "type": "sqrt" } }, { "x": [1, 2, 3, 4, 5], "y": [1, 2, 4, 8, 16], "marker": { "color": "green", "width": 5 }, "type": "scatter", "mode": "markers+lines", "error_y": { "type": "sqrt" } } ] }); |
Huh, that's unexpected. So I guess my question is: is this reasonable? error bars iterate through colorway on their own, independently of the markers they're attached to?? (BTW in future, a CodePen is easier for me to look at than just code, as otherwise I have to go find an environment to run it in!) |
Sounds UNreasonable to me. Unless error bar color is going to be some other color, like black error bars on bar charts, it should be inherited from an explicit color in the trace. Might be some annoying logic considering all the different possible attributes to inherit from - marker color, line color (especially if there IS no marker), marker line color - but I believe it should be clear what the desired outcome is in any given case. Surprised we didn’t already do it this way, but better late than never! |
OK so we should upgrade this issue to fix this in both 2d and 3d. I think in bars it's tricky because if they were the same color as the bars the lower one would be invisible... |
Here I'm only setting the marker color per trace, but the error bars are getting their color seemingly from colorway:
The text was updated successfully, but these errors were encountered: