Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Rev coord wrapping#4843
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Rev coord wrapping#4843
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…rds"This reverts commitd6e1577, reversingchanges made tob280f7d.For 1.4.0 tacaswell refactored annotations (matplotlib#2351 ) but missed that{'axes points', 'axes pixel', 'figure points', 'figure pixel'} werespecial cased to wrap. Presumably from the function name to maintainback compatibility. This was an unintentional and undocumented APIbreak.This API break was noticed inmatplotlib#4012 and fixed inmatplotlib#4019 but that catchestoo many of the coordinate systems (should not be all things that startwith 'axes') so fixed one API, but broke others.There were two reasonable courses of action: 1. revert back to 1.4.2 behavior with nothing wrapping. 2. revert back to 1.3.1 behavior with somethings wrapping.In the discussion inmatplotlib#4292 where the consensus was to go withoption 1, hence this reversion.
This is codifying the API change that went it inmatplotlib#2351
Note to self: this needs to be backported to color_overhaul (which I am not quite sure why we still have around). |
I can't do any in-depth check, but I agree with the change, and all tests pass. (And I've also been wondering about whether we still need color_overhaul.) |
@matplotlib/developers This is a blocker for the next release, can this be merged? |
Looks sane to me. |
plt.text(3, 4, t, family='monospace', ha='right', wrap=True) | ||
plt.text(-1, 0, t, fontsize=14, style='italic', ha='left', rotation=-15, | ||
wrap=True) | ||
def test_annotation_negative_fig_coords(): |
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.
Note: I'd love to get to the point where we used graphics contexts for testing some of this stuff, rather than images.
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.
What do you mean by graphics contexts in this context?
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.
TheGraphicsContextBase and we simply check that the appropriate attributes are set at draw time.
It is another test completely to ensure that a backend is producing the appropriate pixels for a GraphicsContextBase, IMHO.
The flipped origin for negative values of physical units was removed inPRmatplotlib#4843 merged to master as4b25853
The flipped origin for negative values of physical units was removed inPRmatplotlib#4843 merged to master as4b25853
The flipped origin for negative values of physical units was removed inPRmatplotlib#4843 merged to master as4b25853
The flipped origin for negative values of physical units was removed inPRmatplotlib#4843 merged to master as4b25853
Closes#4292