René's URL Explorer Experiment


Title: [ENH]: Compute ticks of log scaled axes a bit better? · Issue #29414 · matplotlib/matplotlib · GitHub

Open Graph Title: [ENH]: Compute ticks of log scaled axes a bit better? · Issue #29414 · matplotlib/matplotlib

X Title: [ENH]: Compute ticks of log scaled axes a bit better? · Issue #29414 · matplotlib/matplotlib

Description: Problem Taken from here, I found the following ticks (from plt.semilogy([1.5, 50])): Not informative enough. I wish there was an easy way to set_minor_formatter such that say e.g 2x10^0, 3x10^0 would have been displayed. I tried to use (...

Open Graph Description: Problem Taken from here, I found the following ticks (from plt.semilogy([1.5, 50])): Not informative enough. I wish there was an easy way to set_minor_formatter such that say e.g 2x10^0, 3x10^0 wou...

X Description: Problem Taken from here, I found the following ticks (from plt.semilogy([1.5, 50])): Not informative enough. I wish there was an easy way to set_minor_formatter such that say e.g 2x10^0, 3x10^0 wou...

Opengraph URL: https://github.com/matplotlib/matplotlib/issues/29414

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[ENH]: Compute ticks of log scaled axes a bit better?","articleBody":"### Problem\n\nTaken from [here](https://github.com/matplotlib/matplotlib/issues/8768/#issuecomment-889516769), I found the following ticks (from `plt.semilogy([1.5, 50])`):\r\n\r\n![image](https://github.com/user-attachments/assets/a5b3e30a-2c2e-4ba1-bd75-b727acee045d)\r\n\r\nNot informative enough. I wish there was an easy way to `set_minor_formatter` such that say\te.g `2x10^0`, `3x10^0` would have been displayed. I tried to use (full MWE this time):\r\n\r\n```python\r\nimport matplotlib.pyplot as plt\r\nfrom matplotlib import ticker\r\n\r\nplt.semilogy([1.5, 50])\r\nplt.gca().yaxis.set_minor_formatter(ticker.LogFormatter(base=10, labelOnlyBase=True))\r\nplt.show()\r\n```\r\n\r\nBut it changed nothing. OTH I was capable to obtain my desired output with:\r\n\r\n```python\r\n#!/usr/bin/env python\r\n\r\nimport numpy as np\r\n\r\nimport matplotlib.pyplot as plt\r\nfrom matplotlib import ticker\r\n\r\nplt.semilogy([1.5, 50])\r\ndef get_minor_tick_string(x, pos):\r\n    b = np.floor(np.log10(x)).astype(int)\r\n    p = pos % 8\r\n    if p \u003c 3:\r\n        return f\"${p+2}\\\\cdot 10^{b}$\"\r\n    else:\r\n        return \"\"\r\nplt.gca().yaxis.set_minor_formatter(get_minor_tick_string)\r\nplt.show()\r\n```\r\n\r\nBut I'm sure it is not very versatile. It produces:\r\n\r\n![image](https://github.com/user-attachments/assets/80f70a0a-e54e-4e6f-9f42-e60d1b9e8e35)\r\n\r\nWhich is not bad.\n\n### Proposed solution\n\nI'd like to first explain in the docs / fix the behavior of `set_minor_formatter(ticker.LogFormatter(base=10, labelOnlyBase=True))`. 2ndly, I'd like to discuss the possibility of adding tick labels as shown above, because I think I'm not the only one that was not satisfied by this default behavior.","author":{"url":"https://github.com/doronbehar","@type":"Person","name":"doronbehar"},"datePublished":"2025-01-06T18:52:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/29414/matplotlib/issues/29414"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:2896f35d-215a-572e-1c6c-13e339912041
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id88D8:27934D:2ADAAB:39BBE8:6A5228C0
html-safe-nonce2c390328d00c7549b87407327c2deb830e73c0d509a9c9ccb53d5239b266400a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OEQ4OjI3OTM0RDoyQURBQUI6MzlCQkU4OjZBNTIyOEMwIiwidmlzaXRvcl9pZCI6IjM5MzY5MTkxNDAxNTQwOTE3MTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac25683b914211817db55df2960c8a67c6f6a3adcda7a5d5558d4753c74e4f4870
hovercard-subject-tagissue:2771246542
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/29414/issue_layout
twitter:imagehttps://opengraph.githubassets.com/a9c0024c32a2a8235cb865c1f1983d29c608a3b8a2c2ed18d8c5736175a131bb/matplotlib/matplotlib/issues/29414
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/a9c0024c32a2a8235cb865c1f1983d29c608a3b8a2c2ed18d8c5736175a131bb/matplotlib/matplotlib/issues/29414
og:image:altProblem Taken from here, I found the following ticks (from plt.semilogy([1.5, 50])): Not informative enough. I wish there was an easy way to set_minor_formatter such that say e.g 2x10^0, 3x10^0 wou...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedoronbehar
hostnamegithub.com
expected-hostnamegithub.com
Noneb9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb
turbo-cache-controlno-preview
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
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release7aed05249554b889eb33d002851a973eebcc7e91
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/matplotlib/matplotlib/issues/29414#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fissues%2F29414
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%2Fissues%2F29414
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%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=matplotlib%2Fmatplotlib
Reloadhttps://github.com/matplotlib/matplotlib/issues/29414
Reloadhttps://github.com/matplotlib/matplotlib/issues/29414
Reloadhttps://github.com/matplotlib/matplotlib/issues/29414
Please reload this pagehttps://github.com/matplotlib/matplotlib/issues/29414
matplotlib https://github.com/matplotlib
matplotlibhttps://github.com/matplotlib/matplotlib
Please reload this pagehttps://github.com/matplotlib/matplotlib/issues/29414
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
[ENH]: Compute ticks of log scaled axes a bit better?https://github.com/matplotlib/matplotlib/issues/29414#top
New featurehttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22New%20feature%22
https://github.com/doronbehar
doronbeharhttps://github.com/doronbehar
on Jan 6, 2025https://github.com/matplotlib/matplotlib/issues/29414#issue-2771246542
herehttps://github.com/matplotlib/matplotlib/issues/8768/#issuecomment-889516769
https://private-user-images.githubusercontent.com/10998835/400513108-a5b3e30a-2c2e-4ba1-bd75-b727acee045d.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODM3Njk1ODAsIm5iZiI6MTc4Mzc2OTI4MCwicGF0aCI6Ii8xMDk5ODgzNS80MDA1MTMxMDgtYTViM2UzMGEtMmMyZS00YmExLWJkNzUtYjcyN2FjZWUwNDVkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MTElMkZ1c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yRnBuZyJ9.cq4EZeB2QbSeQkJLEkrEzmHMPoPRcltkuVvVuw12h6Q
New featurehttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22New%20feature%22
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.