René's URL Explorer Experiment


Title: Logit scale, changes in LogitLocator and LogitFormatter by jb-leger · Pull Request #14512 · matplotlib/matplotlib · GitHub

Open Graph Title: Logit scale, changes in LogitLocator and LogitFormatter by jb-leger · Pull Request #14512 · matplotlib/matplotlib

X Title: Logit scale, changes in LogitLocator and LogitFormatter by jb-leger · Pull Request #14512 · matplotlib/matplotlib

Description: PR Summary I had a lot of bugs on the labelling on logit scale. For example, the following code: import numpy as np import scipy as sp import scipy.stats import matplotlib.pyplot as plt s = np.linspace(-5,5,10000) s2 = np.linspace(-10,10,10000) lims = [(1e-10,1-1e-10),(1e-5,1-1e-5),(11e-2,15e-2)] for k,lim in enumerate(lims): fig,ax = plt.subplots() ax.set_yscale('logit') ax.plot(s,sp.stats.norm.cdf(s)) for i in range(9): ax.plot(s2,sp.stats.t(i+1).cdf(s2)) ax.grid() ax.set_ylim(*lim) fig.savefig(f'/tmp/g{k}.png') Actual behavior I obtain for the very large zoom: For normal zoom: For zoomed axis: Behavior on the proposed branch All this graphs are obtained with the same code as above. I change the locator to allow different behavior, on large zoom, some decade are not proposed on majors, but on minors. No minor ticks used for subdivision of decades. Label are present only on major ticks. I obtain: On normal zoom, all decades are shown on major, minor are indicating subdecade. Most of the time only major ticks are labelled, but when only a few of major are present, a spaced subset of minors can be labelled. I obtain : On a very zoomed graph, the logiscale is kind-of linear, so the MaxNLocator is used (in particular, my LogitLocator inherit from MaxNLocator to allows fallback to MaxNLocator in this case, I obtain: Also, two little things: for ticks labelling, the precision of format is adaptative, and depends of the diff between the labelled tick and neighbors, formater have use_oveline method, which allow use the survival notation (\overline{x} mean 1-x). Not enabled by default. Should solve #13698. PR Checklist I putted my comments on each item. Has Pytest style unit tests I tried to test the most critical behaviors of my code. Code is Flake 8 compliant New features are documented, with examples if plot related Except for some new parameters, I did not add features. Documentation is sphinx and numpydoc compliant I tried, but I did not test, and I don't know how to test that. Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there) I don't know if this change is major. I think it is not. Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way No backward incompatible API changes.

Open Graph Description: PR Summary I had a lot of bugs on the labelling on logit scale. For example, the following code: import numpy as np import scipy as sp import scipy.stats import matplotlib.pyplot as plt s = n...

X Description: PR Summary I had a lot of bugs on the labelling on logit scale. For example, the following code: import numpy as np import scipy as sp import scipy.stats import matplotlib.pyplot as plt s = n...

Opengraph URL: https://github.com/matplotlib/matplotlib/pull/14512

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:b45f906f-293f-0a27-4061-aff25f24e43a
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE272:5C388:7DE8B4:A90B4D:6A55605E
html-safe-noncecbd4c2f51424aa25644d47fcc4e4795d40fb7acc4d002fc6f5e05bcaf32335e4
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMjcyOjVDMzg4OjdERThCNDpBOTBCNEQ6NkE1NTYwNUUiLCJ2aXNpdG9yX2lkIjoiNDk4MDE1ODIzMDk3MjE2MjE0MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac8e3aae917abdc7d350dcdb2bb98e773af98d74732b190ea3670625d666c1b1d6
hovercard-subject-tagpull_request:286498058
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/matplotlib/matplotlib/pull/14512/files
twitter:imagehttps://avatars.githubusercontent.com/u/24868098?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/24868098?s=400&v=4
og:image:altPR Summary I had a lot of bugs on the labelling on logit scale. For example, the following code: import numpy as np import scipy as sp import scipy.stats import matplotlib.pyplot as plt s = n...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb5665c84831ed9ac4fb79519c16c9c5580ba8092fb8bb6e3e72972ec7197348e
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git
octolytics-dimension-user_id215947
octolytics-dimension-user_loginmatplotlib
octolytics-dimension-repository_id1385122
octolytics-dimension-repository_nwomatplotlib/matplotlib
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1385122
octolytics-dimension-repository_network_root_nwomatplotlib/matplotlib
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8201d0b7bc32164c4662de52242e463a356df543
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/matplotlib/matplotlib/pull/14512/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fpull%2F14512%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fpull%2F14512%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=matplotlib%2Fmatplotlib
Reloadhttps://github.com/matplotlib/matplotlib/pull/14512/files
Reloadhttps://github.com/matplotlib/matplotlib/pull/14512/files
Reloadhttps://github.com/matplotlib/matplotlib/pull/14512/files
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/14512/files
matplotlib https://github.com/matplotlib
matplotlibhttps://github.com/matplotlib/matplotlib
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/14512/files
Notifications https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Fork 8.4k https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Star 23k https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Code https://github.com/matplotlib/matplotlib
Issues 1.1k https://github.com/matplotlib/matplotlib/issues
Pull requests 409 https://github.com/matplotlib/matplotlib/pulls
Actions https://github.com/matplotlib/matplotlib/actions
Projects https://github.com/matplotlib/matplotlib/projects
Wiki https://github.com/matplotlib/matplotlib/wiki
Security and quality 0 https://github.com/matplotlib/matplotlib/security
Insights https://github.com/matplotlib/matplotlib/pulse
Code https://github.com/matplotlib/matplotlib
Issues https://github.com/matplotlib/matplotlib/issues
Pull requests https://github.com/matplotlib/matplotlib/pulls
Actions https://github.com/matplotlib/matplotlib/actions
Projects https://github.com/matplotlib/matplotlib/projects
Wiki https://github.com/matplotlib/matplotlib/wiki
Security and quality https://github.com/matplotlib/matplotlib/security
Insights https://github.com/matplotlib/matplotlib/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fmatplotlib%2Fmatplotlib%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib%2Fissues%2Fnew%2Fchoose
tacaswellhttps://github.com/tacaswell
matplotlib:masterhttps://github.com/matplotlib/matplotlib/tree/master
jb-leger:logit_scale_stuffhttps://github.com/jb-leger/matplotlib/tree/logit_scale_stuff
Conversation 187 https://github.com/matplotlib/matplotlib/pull/14512
Commits 14 https://github.com/matplotlib/matplotlib/pull/14512/commits
Checks 0 https://github.com/matplotlib/matplotlib/pull/14512/checks
Files changed https://github.com/matplotlib/matplotlib/pull/14512/files
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/14512/files
Logit scale, changes in LogitLocator and LogitFormatter https://github.com/matplotlib/matplotlib/pull/14512/files#top
Show all changes 14 commits https://github.com/matplotlib/matplotlib/pull/14512/files
e736500 ticker: introduce atol/rtol for comparisons jb-leger Jun 24, 2019 https://github.com/matplotlib/matplotlib/pull/14512/commits/e7365001e86d212c4b142d300878c8171d5cce91
5847a84 logitscale: rewrite of LogitLocator jb-leger Jun 24, 2019 https://github.com/matplotlib/matplotlib/pull/14512/commits/5847a840676af95c1728cc9af8cd7146c06c9d50
adc30ed logitscale: rewrite of LogitFormatter jb-leger Jun 24, 2019 https://github.com/matplotlib/matplotlib/pull/14512/commits/adc30eddd69a2225cb351dce92b7d07b211d7937
4891fbf logitscale: tests, helpers for TestLogitLocator TestLogitFormatter jb-leger Jun 24, 2019 https://github.com/matplotlib/matplotlib/pull/14512/commits/4891fbf9127c554822bc141dec73678cec247cd6
584705e logitscale: tests, rewrite of TestLogitLocator jb-leger Jun 24, 2019 https://github.com/matplotlib/matplotlib/pull/14512/commits/584705e18e5a5546480cb632aa5579d5439bdaab
98e670d logitscale: tests, creation of TestLogitFormatter jb-leger Jun 24, 2019 https://github.com/matplotlib/matplotlib/pull/14512/commits/98e670d8c9a0b19b82c74634028c95f9e2f4ab02
851fa4a logitscale: add option to LogitScale, passed to LogitFormatter jb-leger Jun 24, 2019 https://github.com/matplotlib/matplotlib/pull/14512/commits/851fa4a7adf07c28b7a628021a8ca38b47e2d19e
c1360bb logitscale: remove hack in doc to workround the formatter, it is not … jb-leger Jun 24, 2019 https://github.com/matplotlib/matplotlib/pull/14512/commits/c1360bba15c9bf3c7ea7edb81fb1ebe6cb246e9c
4717b46 logitscale: add new example to illustrate logitscale jb-leger Jun 24, 2019 https://github.com/matplotlib/matplotlib/pull/14512/commits/4717b46d4aa89d2b98a1debde7faf6baa6b12642
6524de2 logitscale: add whatsnew entry jb-leger Jun 24, 2019 https://github.com/matplotlib/matplotlib/pull/14512/commits/6524de2b3ee88a938663c6e83a9fe7bb451f3ac5
e3c8e25 logitscale: typos in whats news entry. jb-leger Jul 21, 2019 https://github.com/matplotlib/matplotlib/pull/14512/commits/e3c8e2521d8d4c943119fe890318637930ffbaf1
eb955d7 logitscale: typos and documentation convention in LogitScale jb-leger Jul 21, 2019 https://github.com/matplotlib/matplotlib/pull/14512/commits/eb955d7de145b4a3e5590114478faa702b91afd0
f68f903 logitscale: typos and documentation convention in LogitFormatter jb-leger Jul 21, 2019 https://github.com/matplotlib/matplotlib/pull/14512/commits/f68f90399d4065e48fc9a5b265b254a7771dae9c
e113aff logitscale: documentation reformulation and typo in LogitFormatter jb-leger Jul 21, 2019 https://github.com/matplotlib/matplotlib/pull/14512/commits/e113aff04046daa42c3ab8709caaa44c8580e54a
Clear filters https://github.com/matplotlib/matplotlib/pull/14512/files
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/14512/files
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/14512/files
logit_scale_stuff.rst https://github.com/matplotlib/matplotlib/pull/14512/files#diff-13e77321ab8c2bd66b7844328e9e87a39f2bbf5b302ac5660a35b4b3a8da0f25
logit_demo.py https://github.com/matplotlib/matplotlib/pull/14512/files#diff-98c1f886d19d133be662b56f72d4fd96e73c7965184c258a6137669eb36137b8
scales.py https://github.com/matplotlib/matplotlib/pull/14512/files#diff-d968f4065419877c78bed591ff8325eed0203c18ac3c7b5f7a89b01d4356f4cc
scale.py https://github.com/matplotlib/matplotlib/pull/14512/files#diff-aa9ad5f5699f4aead65ab741dc9b34f6de86cbfe85fe6ebbc0927b38bbb775d9
test_ticker.py https://github.com/matplotlib/matplotlib/pull/14512/files#diff-fd4f809a4a2ca8b97875eff013bac232c55ca3f92f165117f778960ca1795869
ticker.py https://github.com/matplotlib/matplotlib/pull/14512/files#diff-ffc88dbb928475229d0fc50ae389ef3f0dabc9c5b8abf42b6eb7a0af28afdb66
pyplot.py https://github.com/matplotlib/matplotlib/pull/14512/files#diff-6e69bf08848d1192b369c984e2340103afcd0c35fef85173d0842dd6db63a19f
doc/users/next_whats_new/logit_scale_stuff.rsthttps://github.com/matplotlib/matplotlib/pull/14512/files#diff-13e77321ab8c2bd66b7844328e9e87a39f2bbf5b302ac5660a35b4b3a8da0f25
View file https://github.com/jb-leger/matplotlib/blob/e113aff04046daa42c3ab8709caaa44c8580e54a/doc/users/next_whats_new/logit_scale_stuff.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/matplotlib/matplotlib/pull/14512/{{ revealButtonHref }}
examples/scales/logit_demo.pyhttps://github.com/matplotlib/matplotlib/pull/14512/files#diff-98c1f886d19d133be662b56f72d4fd96e73c7965184c258a6137669eb36137b8
View file https://github.com/jb-leger/matplotlib/blob/e113aff04046daa42c3ab8709caaa44c8580e54a/examples/scales/logit_demo.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/matplotlib/matplotlib/pull/14512/{{ revealButtonHref }}
anntzerhttps://github.com/anntzer
Jun 18, 2019https://github.com/matplotlib/matplotlib/pull/14512/files#r294998274
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
https://22432-1385122-gh.circle-artifacts.com/0/home/circleci/project/doc/build/html/gallery/scales/logit_demo.html#sphx-glr-gallery-scales-logit-demo-pyhttps://22432-1385122-gh.circle-artifacts.com/0/home/circleci/project/doc/build/html/gallery/scales/logit_demo.html#sphx-glr-gallery-scales-logit-demo-py
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/14512/files
jb-legerhttps://github.com/jb-leger
Jun 18, 2019https://github.com/matplotlib/matplotlib/pull/14512/files#r295010854
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/14512/files
anntzerhttps://github.com/anntzer
Jun 18, 2019https://github.com/matplotlib/matplotlib/pull/14512/files#r295012183
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
https://matplotlib.org/devel/documenting_mpl.html#building-the-docshttps://matplotlib.org/devel/documenting_mpl.html#building-the-docs
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/14512/files
jb-legerhttps://github.com/jb-leger
Jun 18, 2019https://github.com/matplotlib/matplotlib/pull/14512/files#r295021444
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/14512/files
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/14512/files
anntzerhttps://github.com/anntzer
Jun 18, 2019https://github.com/matplotlib/matplotlib/pull/14512/files#r295022480
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/14512/files
jb-legerhttps://github.com/jb-leger
Jun 18, 2019https://github.com/matplotlib/matplotlib/pull/14512/files#r295047339
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/14512/files
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/14512/files
examples/scales/scales.pyhttps://github.com/matplotlib/matplotlib/pull/14512/files#diff-d968f4065419877c78bed591ff8325eed0203c18ac3c7b5f7a89b01d4356f4cc
View file https://github.com/jb-leger/matplotlib/blob/e113aff04046daa42c3ab8709caaa44c8580e54a/examples/scales/scales.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/matplotlib/matplotlib/pull/14512/{{ revealButtonHref }}
https://github.com/matplotlib/matplotlib/pull/14512/files#diff-d968f4065419877c78bed591ff8325eed0203c18ac3c7b5f7a89b01d4356f4cc
https://github.com/matplotlib/matplotlib/pull/14512/files#diff-d968f4065419877c78bed591ff8325eed0203c18ac3c7b5f7a89b01d4356f4cc
lib/matplotlib/scale.pyhttps://github.com/matplotlib/matplotlib/pull/14512/files#diff-aa9ad5f5699f4aead65ab741dc9b34f6de86cbfe85fe6ebbc0927b38bbb775d9
View file https://github.com/jb-leger/matplotlib/blob/e113aff04046daa42c3ab8709caaa44c8580e54a/lib/matplotlib/scale.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/matplotlib/matplotlib/pull/14512/{{ revealButtonHref }}
https://github.com/matplotlib/matplotlib/pull/14512/files#diff-aa9ad5f5699f4aead65ab741dc9b34f6de86cbfe85fe6ebbc0927b38bbb775d9
https://github.com/matplotlib/matplotlib/pull/14512/files#diff-aa9ad5f5699f4aead65ab741dc9b34f6de86cbfe85fe6ebbc0927b38bbb775d9
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/14512/files
https://github.com/matplotlib/matplotlib/pull/14512/files#diff-aa9ad5f5699f4aead65ab741dc9b34f6de86cbfe85fe6ebbc0927b38bbb775d9
https://github.com/matplotlib/matplotlib/pull/14512/files#diff-aa9ad5f5699f4aead65ab741dc9b34f6de86cbfe85fe6ebbc0927b38bbb775d9
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/14512/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.