-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
DOC: clarify alpha handling for indicate_inset[_zoom] #28710
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should maybe change the default? The use case for alpha taking precedence was user passed in alpha trumping color tuple alpha. #24691 (comment)
Uh @timhoffm? (wrote this before I saw Tim's comment 😓 )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree that this is not ideal, because you cannot set face and edge transparencies independently without first resetting alpha.
In general, this seems not too useful by default: I would have expected the edgecolors to be solid (=frame should be above the plot). There is no facecolor by default. The only thing this serves is that you can get a semi-transparent face by specifying a simple solid color - OTOH that's confusing.
I suggest to change this to
None
by default. Optionally, change edgecolor to be the solid-equivalent color of('0.5', 0.5)
against a white background. But I'm inclined to see both the grey "0.5" and the alpha=0.5 as uncoordinated ways to lighten the frame and suspect using both is not intentional. So possibly, just keep edgecolor as is.Overall I'd just do it and call it a bug fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alpha = 0.5 was originally for the lines that indicate the inset which often cross data, and hence its nice to have some indication of the data underneath. It was not meant to apply to the facecolor of the inset indicator patch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current defaults make sense to me. The point of these patches is to point to some other features we are indicating, so they should interfere as little as possible with our view of those things. I think most of the time a user would not want a facecolor because that would make it harder to see the colours of the thing they are indicating. With this PR we will have documented how to change the alpha for the rarer occasions when a facecolor is wanted and the face/edge alpha should be different.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @rcomer, was thinking of it in very general artists terms and not the specific use case 🤦♀️
I think you make a good point so now agree that doc solution is better here.