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

Error bars not inheriting color #3392

Closed
nicolaskruchten opened this issue Jan 3, 2019 · 4 comments · Fixed by #3408
Closed

Error bars not inheriting color #3392

nicolaskruchten opened this issue Jan 3, 2019 · 4 comments · Fixed by #3408
Assignees

Comments

@nicolaskruchten
Copy link
Member

Here I'm only setting the marker color per trace, but the error bars are getting their color seemingly from colorway:

image

@archmoj archmoj self-assigned this Jan 3, 2019
@archmoj
Copy link
Contributor

archmoj commented Jan 4, 2019

@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"
      }
    }
  ]
});

@nicolaskruchten
Copy link
Member Author

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!)

@alexcjohnson
Copy link
Collaborator

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!

@nicolaskruchten
Copy link
Member Author

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...

@archmoj archmoj changed the title 3d error bars not inheriting color Error bars not inheriting color Jan 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment