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
Rev coord wrapping #4843
Rev coord wrapping #4843
Conversation
…rds" This reverts commit d6e1577, reversing changes made to b280f7d. For 1.4.0 tacaswell refactored annotations (matplotlib#2351 ) but missed that {'axes points', 'axes pixel', 'figure points', 'figure pixel'} were special cased to wrap. Presumably from the function name to maintain back compatibility. This was an unintentional and undocumented API break. This API break was noticed in matplotlib#4012 and fixed in matplotlib#4019 but that catches too many of the coordinate systems (should not be all things that start with '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 in matplotlib#4292 where the consensus was to go with option 1, hence this reversion.
This is codifying the API change that went it in matplotlib#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.
The GraphicsContextBase 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 in PR matplotlib#4843 merged to master as 4b25853
The flipped origin for negative values of physical units was removed in PR matplotlib#4843 merged to master as 4b25853
The flipped origin for negative values of physical units was removed in PR matplotlib#4843 merged to master as 4b25853
The flipped origin for negative values of physical units was removed in PR matplotlib#4843 merged to master as 4b25853
Closes #4292