-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix negative annotations xycoords. #4019
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
Conversation
Something looks wrong in the png output. |
Use top-right as translation reference point when xycoords are given in "point" or "pixel" and x or y are negative. Logic based on _get_xy_legacy removed in a65151b.
I missed editing one of the _get_xy_transform calls, but I don't think that is the cause of weird PNG output. Running the same test without the changes to text.py results in similar weirdness. I think it has to do with the particular coordinates in the test and the DPI. I will update the request for the additional _get_xy_transform but am unsure of the PNG weirdness. |
I think the issue is just that the test strings fall on top of each other. On Thu, Jan 22, 2015, 08:18 Matt Shen notifications@github.com wrote:
|
3f965ea
to
162239f
Compare
162239f has the additional _get_xy_transform as wel as tweaked strings. |
BUG : fix negative coords in annotation
I am going to merge this on my local machine so that I can remove the pdf and svg tests (see tacaswell@d6e1577), I am just waiting for the tests to pass on travis before pushing to upstream. |
Merged as d6e1577 |
BUG : fix negative coords in annotation Conflicts: lib/matplotlib/tests/test_text.py cherry pick was too aggressive picking up tests from master
back-ported as cf23500 |
…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.
…_neg_coords"" This partially reverts commit 7b71257. Too many tests were removed, restore the extra tests.
…_neg_coords"" This partially reverts commit 7b71257. Too many tests were removed, restore the extra tests.
…_neg_coords"" This partially reverts commit 7b71257. Too many tests were removed, restore the extra tests.
…_neg_coords"" This partially reverts commit 7b71257. Too many tests were removed, restore the extra tests.
…_neg_coords"" This partially reverts commit 7b71257. Too many tests were removed, restore the extra tests.
Use top-right as translation reference point when xycoords are given in
"point" or "pixel" and x or y are negative. Logic based on
_get_xy_legacy removed in a65151b.