-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
circle-cross (and open) markers do not respect the marker line color #4473
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
Thanks @rl-utility-man - this certainly is confusing behavior, though it has worked this way for many years so probably not something we want to change at this point. See eg our test image marker_symbols.png which renders marker_symbols.json where all the markers have I think the original rationale was that since open markers only have one color, they should use the primary marker color and ignore the line color. Thus if you're fiddling with a graph and swapping between open and filled markers, the "most important" color is preserved. This rationale was better justified when the main way people made these graphs was via the Chart Studio GUI rather than programmatically, but (in addition to backward compatibility) the GUI is still important enough that I think we should handle this just by prominent docs as you suggest (cc @LiamConnors) |
@LiamConnors Should I put in a pull request with proposed documentation on this issue? |
Hi @rl-utility-man, we'd be very happy to accept a PR for the documentation update if you'd like to work on it. If not, I'll work on the update later this week. Thanks! |
Hi @rl-utility-man, I've added some info to the docs here: |
@LiamConnors is there anything I can do to help merge #4485, which appears to be approved but not merged. Once it is merged, we can close this issue. Many thanks! |
Thanks @rl-utility-man. I'm just taking a look at the failing tests, which aren't related to the PR, and then I'll merge it in. |
In the following example, the code seems to call for the lines around the outside of the circles to be the same color, but they are not. Setting the marker line color property has no effect on circle cross style markers. It does not matter if I set it using
update_traces
orfig.data[1]["marker"]["line"]["color"]="#008081"
I was a bit astonished that in filled markers, the line width and line color both control the boundary but that is appears as if, in open markers, the line width still controls the boundary but the marker fill color controls the color of the boundary. So efforts to specify one boundary color for the whole figure or efforts to adjust the boundary width and color directly using the "line" properties fail to yield intuitive boundary color behavior. This makes writing the code to do an intuitive thing -- like putting black boundaries on all symbols -- messy and prone to failing. If the user has directly specified just one of the two values at the trace level and left the other unspecified, could Plotly honor the user specified color for open symbols? (That should be backward compatible except in odd cases where the user specified a parameter that did nothing.)
If the user has specified a global marker color and not overridden it -- as in the example below -- could Plotly honor that as well?
Or, if cleaning this up would break lots of existing code, some prominent documentation here would help.
I am a big fan of plotly and appreciate all the careful thought that has gone into it and that there's no one obvious place to put the color control for hollow symbols.
The resulting JSON is:
The text was updated successfully, but these errors were encountered: