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

Offset text should be computed based on lowest and highest ticks, not actual axes limits #5738

Closed
anntzer opened this issue Dec 24, 2015 · 1 comment
Milestone

Comments

@anntzer
Copy link
Contributor

anntzer commented Dec 24, 2015

Now that the default margins are nonzero, picking the offset text based on the axes limits rather than the tick limits can have some unesthetic consequences:

plot([1e5, 1e5+1], [0, 1])

Old style (margins=0)
old
New style (margins>0)
new
This is not a new issue (it can be reproduced with 1.5.0 by explicitly calling margins), it just got much more salient.

@jenshnielsen jenshnielsen modified the milestones: Critical bugfix release (1.5.1), next bug fix release (2.0.1), next major release (2.0) Dec 24, 2015
anntzer added a commit to anntzer/matplotlib that referenced this issue Dec 31, 2015
e.g. when the xlims are -0.5 .. 10.5, return 0 .. 10 instead of -1
.. 11.  This implies dropping the (unused and deprecated-in-comment)
"trim" keyword argument.

Also slightly clean up the implementation of scale_range.

Preliminary work on matplotlib#5738.
anntzer added a commit to anntzer/matplotlib that referenced this issue Dec 31, 2015
plt.plot([-.1, .2]) used to pick (in round numbers mode) [-.1, .25] as
ylims due to floating point inaccuracies; change it to pick [-.1, .2]
(up to floating point inaccuracies).

Note that this requires working around a bug in numpy's implementation
of divmod (numpy/numpy#6127).

Many test images have changed!

See matplotlib#5767.

Probably also wraps up work on matplotlib#5738, but tests are missing.
anntzer added a commit to anntzer/matplotlib that referenced this issue Dec 31, 2015
plt.plot([-.1, .2]) used to pick (in round numbers mode) [-.1, .25] as
ylims due to floating point inaccuracies; change it to pick [-.1, .2]
(up to floating point inaccuracies).

Note that this requires working around a bug in numpy's implementation
of divmod (numpy/numpy#6127).

Many test images have changed!

See matplotlib#5767.

Probably also wraps up work on matplotlib#5738, but tests are missing.
anntzer added a commit to anntzer/matplotlib that referenced this issue Dec 31, 2015
plt.plot([-.1, .2]) used to pick (in round numbers mode) [-.1, .25] as
ylims due to floating point inaccuracies; change it to pick [-.1, .2]
(up to floating point inaccuracies).

Note that this requires working around a bug in numpy's implementation
of divmod (numpy/numpy#6127).

Many test images have changed!

See matplotlib#5767.

Also some more progress on matplotlib#5738.
anntzer added a commit to anntzer/matplotlib that referenced this issue Jan 1, 2016
plt.plot([-.1, .2]) used to pick (in round numbers mode) [-.1, .25] as
ylims due to floating point inaccuracies; change it to pick [-.1, .2]
(up to floating point inaccuracies).

Support for the (unused and deprecated-in-comment) "trim" keyword
argument has been dropped as the way ticks are picked has changed.

Many test images have changed!

Implementation notes:
- A bug in numpy's implementation of divmod (numpy/numpy#6127) is worked
around.
- The implementation of scale_range has also been cleaned.

See matplotlib#5767, matplotlib#5738.
anntzer added a commit to anntzer/matplotlib that referenced this issue Jan 1, 2016
plt.plot([-.1, .2]) used to pick (in round numbers mode) [-.1, .25] as
ylims due to floating point inaccuracies; change it to pick [-.1, .2]
(up to floating point inaccuracies).

Support for the (unused and deprecated-in-comment) "trim" keyword
argument has been dropped as the way ticks are picked has changed.

Many test images have changed!

Implementation notes:
- A bug in numpy's implementation of divmod (numpy/numpy#6127) is worked
around.
- The implementation of scale_range has also been cleaned.

See matplotlib#5767, matplotlib#5738.
anntzer added a commit to anntzer/matplotlib that referenced this issue Jan 2, 2016
plt.plot([-.1, .2]) used to pick (in round numbers mode) [-.1, .25] as
ylims due to floating point inaccuracies; change it to pick [-.1, .2]
(up to floating point inaccuracies).

Support for the (unused and deprecated-in-comment) "trim" keyword
argument has been dropped as the way ticks are picked has changed.

Many test images have changed!

Implementation notes:
- A bug in numpy's implementation of divmod (numpy/numpy#6127) is worked
around.
- The implementation of scale_range has also been cleaned.

See matplotlib#5767, matplotlib#5738.
@tacaswell
Copy link
Member

Closed by #5780

anntzer added a commit to anntzer/matplotlib that referenced this issue Feb 15, 2016
plt.plot([-.1, .2]) used to pick (in round numbers mode) [-.1, .25] as
ylims due to floating point inaccuracies; change it to pick [-.1, .2]
(up to floating point inaccuracies).

Support for the (unused and deprecated-in-comment) "trim" keyword
argument has been dropped as the way ticks are picked has changed.

Many test images have changed!

Implementation notes:
- A bug in numpy's implementation of divmod (numpy/numpy#6127) is worked
around.
- The implementation of scale_range has also been cleaned.

See matplotlib#5767, matplotlib#5738.
jenshnielsen pushed a commit to jenshnielsen/matplotlib that referenced this issue Mar 20, 2016
plt.plot([-.1, .2]) used to pick (in round numbers mode) [-.1, .25] as
ylims due to floating point inaccuracies; change it to pick [-.1, .2]
(up to floating point inaccuracies).

Support for the (unused and deprecated-in-comment) "trim" keyword
argument has been dropped as the way ticks are picked has changed.

Many test images have changed!

Implementation notes:
- A bug in numpy's implementation of divmod (numpy/numpy#6127) is worked
around.
- The implementation of scale_range has also been cleaned.

See matplotlib#5767, matplotlib#5738.
jenshnielsen pushed a commit to jenshnielsen/matplotlib that referenced this issue Mar 20, 2016
plt.plot([-.1, .2]) used to pick (in round numbers mode) [-.1, .25] as
ylims due to floating point inaccuracies; change it to pick [-.1, .2]
(up to floating point inaccuracies).

Support for the (unused and deprecated-in-comment) "trim" keyword
argument has been dropped as the way ticks are picked has changed.

Many test images have changed!

Implementation notes:
- A bug in numpy's implementation of divmod (numpy/numpy#6127) is worked
around.
- The implementation of scale_range has also been cleaned.

See matplotlib#5767, matplotlib#5738.
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

No branches or pull requests

3 participants