Skip to content
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

Merged
merged 3 commits into from Aug 6, 2015
Merged

Conversation

tacaswell
Copy link
Member

Closes #4292

…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
@tacaswell tacaswell added the Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. label Jul 31, 2015
@tacaswell tacaswell added this to the next point release milestone Jul 31, 2015
@tacaswell
Copy link
Member Author

attn @efiring @stretch97 @QuLogic @myshen

@tacaswell
Copy link
Member Author

Note to self: this needs to be backported to color_overhaul (which I am not quite sure why we still have around).

@efiring
Copy link
Member

efiring commented Aug 1, 2015

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.)

@tacaswell
Copy link
Member Author

@matplotlib/developers This is a blocker for the next release, can this be merged?

@dopplershift
Copy link
Contributor

Looks sane to me.

dopplershift added a commit that referenced this pull request Aug 6, 2015
@dopplershift dopplershift merged commit 4b25853 into matplotlib:master Aug 6, 2015
@tacaswell tacaswell deleted the REV_coord_wrapping branch August 6, 2015 19:17
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():
Copy link
Member

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.

Copy link
Member Author

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?

Copy link
Member

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.

tacaswell added a commit to tacaswell/matplotlib that referenced this pull request Sep 5, 2016
The flipped origin for negative values of physical units was removed in
PR matplotlib#4843 merged to master as 4b25853
tacaswell added a commit to tacaswell/matplotlib that referenced this pull request Sep 5, 2016
The flipped origin for negative values of physical units was removed in
PR matplotlib#4843 merged to master as 4b25853
tacaswell added a commit to tacaswell/matplotlib that referenced this pull request Sep 11, 2016
The flipped origin for negative values of physical units was removed in
PR matplotlib#4843 merged to master as 4b25853
tacaswell added a commit to tacaswell/matplotlib that referenced this pull request Sep 12, 2016
The flipped origin for negative values of physical units was removed in
PR matplotlib#4843 merged to master as 4b25853
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants