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

Merged
merged 1 commit into from Jan 1, 2016

Conversation

Projects
None yet
2 participants
Contributor

anntzer commented Jan 1, 2016

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

@anntzer anntzer Choose offset text from ticks, not axes limits.
4d45592

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

Owner

tacaswell commented Jan 1, 2016

👍

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

Contributor

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.

Owner

tacaswell commented Jan 1, 2016

Fair enough

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

@tacaswell tacaswell Merge pull request #5780 from anntzer/offsettext-uses-ticks-not-axes-…
…limits

Choose offset text from ticks, not axes limits.
9c690ed

@tacaswell tacaswell merged commit 9c690ed into matplotlib:master Jan 1, 2016

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.002%) to 68.504%
Details

tacaswell removed the needs_review label Jan 1, 2016

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

@tacaswell tacaswell Merge pull request #5780 from anntzer/offsettext-uses-ticks-not-axes-…
…limits

Choose offset text from ticks, not axes limits.
f52afbf
Owner

tacaswell commented Jan 1, 2016

backported to 2.x as f52afbf

anntzer deleted the anntzer:offsettext-uses-ticks-not-axes-limits branch Jan 1, 2016

@anntzer anntzer added a commit to anntzer/matplotlib that referenced this pull request Jan 2, 2016

@anntzer anntzer Better choice of offset-text.
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 #5780)
99990.5, 100000.5 => 100000
1233999, 1234001 => 1234000

(and the same for negative limits).

See #5755.
5f69ed8

@anntzer anntzer added a commit to anntzer/matplotlib that referenced this pull request Jan 2, 2016

@anntzer anntzer Better choice of offset-text.
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 #5780)
99990.5, 100000.5 => 100000
1233999, 1234001 => 1234000

(and the same for negative limits).

See #5755.
d6e9f80

@anntzer anntzer added a commit to anntzer/matplotlib that referenced this pull request Jan 2, 2016

@anntzer anntzer Better choice of offset-text.
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 #5780)
99990.5, 100000.5 => 100000
1233999, 1234001 => 1234000

(and the same for negative limits).

See #5755.
56026ae

@anntzer anntzer added a commit to anntzer/matplotlib that referenced this pull request Jan 7, 2016

@anntzer anntzer Better choice of offset-text.
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 #5780)
99990.5, 100000.5 => 100000
1233999, 1234001 => 1234000

(and the same for negative limits).

See #5755.
c73a275

@anntzer anntzer added a commit to anntzer/matplotlib that referenced this pull request Jan 27, 2016

@anntzer anntzer Better choice of offset-text.
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 #5780)
99990.5, 100000.5 => 100000
1233999, 1234001 => 1234000

(and the same for negative limits).

See #5755.
226b996

@anntzer anntzer added a commit to anntzer/matplotlib that referenced this pull request Feb 18, 2016

@anntzer anntzer Better choice of offset-text.
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 #5780)
99990.5, 100000.5 => 100000
1233999, 1234001 => 1234000

(and the same for negative limits).

See #5755.
691e680

@anntzer anntzer added a commit to anntzer/matplotlib that referenced this pull request May 2, 2016

@anntzer anntzer Better choice of offset-text.
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 #5780)
99990.5, 100000.5 => 100000
1233999, 1234001 => 1234000

(and the same for negative limits).

See #5755.
9a4ecfb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment