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

Choose offset text from ticks, not axes limits. #5780

Merged

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Jan 1, 2016

Turns out the fix for #5738 was easier than expected.

@tacaswell tacaswell added this to the next major release (2.0) milestone Jan 1, 2016
@tacaswell
Copy link
Member

👍

This should get a png only image test (the example from #5738 is perfect).

It looks like there is some low-hanging re-factoring possible here (_set_offset is only called from set_locs which passes in the range derived from a call to get_view_interval, nothing is wrong just could be neater and it is not clear to me that pulling on that stitch won't unravel way more than intended).

@anntzer
Copy link
Contributor Author

anntzer commented Jan 1, 2016

I'm sort of hoping to just get this merged as-is and get a better test suite (not image based) / refactoring when working on #5755.

@tacaswell
Copy link
Member

Fair enough

tacaswell added a commit that referenced this pull request Jan 1, 2016
…limits

Choose offset text from ticks, not axes limits.
@tacaswell tacaswell merged commit 9c690ed into matplotlib:master Jan 1, 2016
tacaswell added a commit that referenced this pull request Jan 1, 2016
…limits

Choose offset text from ticks, not axes limits.
@tacaswell
Copy link
Member

backported to 2.x as f52afbf

@anntzer anntzer deleted the offsettext-uses-ticks-not-axes-limits branch January 1, 2016 23:14
anntzer added a commit to anntzer/matplotlib that referenced this pull request Jan 2, 2016
The axis offset text is choosen as follows:

xlims => offsettext
123, 189 => 0
12341, 12349 => 12340
99999.5, 100010.5 => 100000 # (also a test for matplotlib#5780)
99990.5, 100000.5 => 100000
1233999, 1234001 => 1234000

(and the same for negative limits).

See matplotlib#5755.
anntzer added a commit to anntzer/matplotlib that referenced this pull request Jan 2, 2016
The axis offset text is choosen as follows:

xlims => offsettext
123, 189 => 0
12341, 12349 => 12340
99999.5, 100010.5 => 100000 # (also a test for matplotlib#5780)
99990.5, 100000.5 => 100000
1233999, 1234001 => 1234000

(and the same for negative limits).

See matplotlib#5755.
anntzer added a commit to anntzer/matplotlib that referenced this pull request Jan 2, 2016
The axis offset text is chosen as follows:

xlims => offsettext
123, 189 => 0
12341, 12349 => 12340
99999.5, 100010.5 => 100000 # (also a test for matplotlib#5780)
99990.5, 100000.5 => 100000
1233999, 1234001 => 1234000

(and the same for negative limits).

See matplotlib#5755.
anntzer added a commit to anntzer/matplotlib that referenced this pull request Jan 7, 2016
The axis offset text is chosen as follows:

xlims => offsettext
123, 189 => 0
12341, 12349 => 12340
99999.5, 100010.5 => 100000 # (also a test for matplotlib#5780)
99990.5, 100000.5 => 100000
1233999, 1234001 => 1234000

(and the same for negative limits).

See matplotlib#5755.
anntzer added a commit to anntzer/matplotlib that referenced this pull request Jan 27, 2016
The axis offset text is chosen as follows:

xlims => offsettext
123, 189 => 0
12341, 12349 => 12340
99999.5, 100010.5 => 100000 # (also a test for matplotlib#5780)
99990.5, 100000.5 => 100000
1233999, 1234001 => 1234000

(and the same for negative limits).

See matplotlib#5755.
anntzer added a commit to anntzer/matplotlib that referenced this pull request Feb 18, 2016
The axis offset text is chosen as follows:

xlims => offsettext
123, 189 => 0
12341, 12349 => 12340
99999.5, 100010.5 => 100000 # (also a test for matplotlib#5780)
99990.5, 100000.5 => 100000
1233999, 1234001 => 1234000

(and the same for negative limits).

See matplotlib#5755.
anntzer added a commit to anntzer/matplotlib that referenced this pull request May 2, 2016
The axis offset text is chosen as follows:

xlims => offsettext
123, 189 => 0
12341, 12349 => 12340
99999.5, 100010.5 => 100000 # (also a test for matplotlib#5780)
99990.5, 100000.5 => 100000
1233999, 1234001 => 1234000

(and the same for negative limits).

See matplotlib#5755.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants