GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Choose offset text from ticks, not axes limits. by anntzer · Pull Request #5780 · matplotlib/matplotlib

Conversation

@anntzer

@anntzer anntzer commented Jan 1, 2016

Copy link
Copy Markdown
Contributor

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@tacaswell tacaswell added the status: needs review label Jan 1, 2016
@anntzer
Choose offset text from ticks, not axes limits.
4d45592
@tacaswell tacaswell added this to the next major release (2.0) milestone Jan 1, 2016
@tacaswell

tacaswell commented Jan 1, 2016

Copy link
Copy Markdown
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).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@anntzer

anntzer commented Jan 1, 2016

Copy link
Copy Markdown
Contributor Author

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tacaswell tacaswell mentioned this pull request Jan 1, 2016
Better choice of axes offset value #5755
Closed
@tacaswell

tacaswell commented Jan 1, 2016

Copy link
Copy Markdown
Member

Fair enough

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

tacaswell added a commit that referenced this pull request Jan 1, 2016
@tacaswell
Merge pull request #5780 from anntzer/offsettext-uses-ticks-not-axes-…
9c690ed
…limits

Choose offset text from ticks, not axes limits.
@tacaswell
tacaswell merged commit 9c690ed into matplotlib:master Jan 1, 2016
@tacaswell tacaswell removed the status: needs review label Jan 1, 2016
tacaswell added a commit that referenced this pull request Jan 1, 2016
@tacaswell
Merge pull request #5780 from anntzer/offsettext-uses-ticks-not-axes-…
f52afbf
…limits

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

tacaswell commented Jan 1, 2016

Copy link
Copy Markdown
Member

backported to 2.x as f52afbf

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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
@anntzer
Better choice of offset-text.
5f69ed8
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
@anntzer
Better choice of offset-text.
d6e9f80
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
@anntzer
Better choice of offset-text.
56026ae
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 anntzer mentioned this pull request Jan 2, 2016
Better choice of offset-text. #5785
Merged
@tacaswell tacaswell mentioned this pull request Jan 3, 2016
Offset text should be computed based on lowest and highest ticks, not actual axes limits #5738
Closed
anntzer added a commit to anntzer/matplotlib that referenced this pull request Jan 7, 2016
@anntzer
Better choice of offset-text.
c73a275
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
@anntzer
Better choice of offset-text.
226b996
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
@anntzer
Better choice of offset-text.
691e680
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
@anntzer
Better choice of offset-text.
9a4ecfb
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

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

v2.0.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@anntzer @tacaswell
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.