-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Annotation: always use FancyBboxPatch instead of bbox_artist #4178
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 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
9d933bc
Annotation: always use FancyBboxPatch instead of bbox_artist
efiring 7829262
Annotate: draw text before arrow; closes #4140
efiring ebaa39a
Grammer of "shrink" variations
efiring c1bc666
Correct the default size of text bbox patch and support 'pad' kwarg
efiring 197fc9f
Removed YAArrow usage from Annotation.
efiring 1e6af77
remove more YAArrow debris
efiring 2eb4313
handle pad defaults; fix sizing of YAArrow substitute
efiring 3e88b3a
pep8
efiring 9eceef3
Handle the case in which boxstyle is a callable, not a string
efiring 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
Removed YAArrow usage from Annotation.
YAArrow is now partly simulated with the FancyArrowPatch, which remains as the only arrow class used by Annotation. I ignored the 'frac' key and added the 'headlength' key; the 'frac' was never a good API because it scaled head length with the arrow length, but left all other dimensions in units of points.
- Loading branch information
commit 197fc9fa29472c7e7f88591e91c5d118dc552d5a
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
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
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.
use super here (you use it in
update
)?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.
True, I did. That is new code, and right next to another method in which super is used. But the "Text.draw()" is not new, and it is one of several such lines in this module. I'm inclined to think that "super-ifying" the module is out of scope for this PR. I also note that not all parent class method calls in this module can be handled with super;
Annotation.__init__
needs to call the__init__
from each of its immediate parents. The only way to avoid that would be to rewrite it so as to use composition rather than multiple inheritance. In the long run that could bring a big gain in readability and maintainability, but given the present complexity of this entire family of code, it would be quite a job.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.
Fair.