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

Minor cleanups. #26967

Merged
merged 1 commit into from
Oct 2, 2023
Merged

Minor cleanups. #26967

merged 1 commit into from
Oct 2, 2023

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Sep 30, 2023

Re: the rewriting of AsinhLocator formulas: The previous implementation added 1e-6 to the logs in the case where xs=0 in order to avoid a warning with log(0), but the result of the log was then zeroed out by multiplication by xs anyways. Instead, here we just rely on 10**log(0) = 10**-inf = 0.

PR summary

PR checklist

@oscargus oscargus added this to the v3.9.0 milestone Oct 2, 2023
Copy link
Member

@story645 story645 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if the x/y scale flip was intended (which comment please if so) or typo

lib/matplotlib/backend_bases.py Outdated Show resolved Hide resolved
lib/matplotlib/backend_bases.py Outdated Show resolved Hide resolved
Re: the rewriting of AsinhLocator formulas: The previous implementation
added 1e-6 to the logs in the case where xs=0 in order to avoid a
warning with log(0), but the result of the log was then zeroed out by
multiplication by xs anyways.  Instead, here we just rely on
`10**log(0) = 10**-inf = 0`.
@ksunden ksunden merged commit 56a407c into matplotlib:main Oct 2, 2023
40 checks passed
@anntzer anntzer deleted the cleanups branch October 2, 2023 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants