Title: [Bug]: LogLocator sometimes draws fewer ticks than it can · Issue #29694 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: LogLocator sometimes draws fewer ticks than it can · Issue #29694 · matplotlib/matplotlib
X Title: [Bug]: LogLocator sometimes draws fewer ticks than it can · Issue #29694 · matplotlib/matplotlib
Description: Bug summary Sometimes, LogLocator draws fewer ticks than it can due to less than optimal log stride selection. Code for reproduction from pylab import * # At this figure size there's room for two y ticks # (check with ax.yaxis.get_tick_s...
Open Graph Description: Bug summary Sometimes, LogLocator draws fewer ticks than it can due to less than optimal log stride selection. Code for reproduction from pylab import * # At this figure size there's room for two y...
X Description: Bug summary Sometimes, LogLocator draws fewer ticks than it can due to less than optimal log stride selection. Code for reproduction from pylab import * # At this figure size there's room for t...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/29694
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: LogLocator sometimes draws fewer ticks than it can","articleBody":"### Bug summary\n\nSometimes, LogLocator draws fewer ticks than it can due to less than optimal log stride selection.\n\n### Code for reproduction\n\n```Python\nfrom pylab import *\n\n# At this figure size there's room for two y ticks\n# (check with ax.yaxis.get_tick_space())\n# which could be placed e.g. at 10^0 and 10^4,\n# but only one tick is drawn at 10^2.\nfigure(figsize=(5, 1)).add_subplot(yscale=\"log\", ylim=(.5, 15000))\n```\n\n### Actual outcome\n\nSee comment above.\n\n### Expected outcome\n\nSee comment above.\n\n### Additional information\n\nI suspect that the formulas for stride and decades in LogLocator.tick_values() are faulty.\n\n### Operating system\n\nany\n\n### Matplotlib Version\n\n3.11.0.dev511+g0b7a88a967\n\n### Matplotlib Backend\n\nany\n\n### Python version\n\n3.13\n\n### Jupyter version\n\nno\n\n### Installation\n\ngit checkout","author":{"url":"https://github.com/anntzer","@type":"Person","name":"anntzer"},"datePublished":"2025-02-28T22:47:08.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/29694/matplotlib/issues/29694"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ce496f43-81c9-98ef-301f-37badf99ce9d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B1A0:2BE11D:10C11BC:16C0AB2:6A522AB8 |
| html-safe-nonce | 95b1b90dc25ae67d85a546ad3a0b9028cba6f2516efdcb32528583673d8e3a48 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMUEwOjJCRTExRDoxMEMxMUJDOjE2QzBBQjI6NkE1MjJBQjgiLCJ2aXNpdG9yX2lkIjoiOTA4MDA3MzAwMjIyMjY2MTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a345e2d4a0a602bca172c90f0603c1bcfe7302e12b7866414f5f195e01ebd49c |
| hovercard-subject-tag | issue:2888188455 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/29694/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1b5cc7729e70700770de1e6f433cf27a3f5f3691f81341562d6d7e3ce45dd6ea/matplotlib/matplotlib/issues/29694 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1b5cc7729e70700770de1e6f433cf27a3f5f3691f81341562d6d7e3ce45dd6ea/matplotlib/matplotlib/issues/29694 |
| og:image:alt | Bug summary Sometimes, LogLocator draws fewer ticks than it can due to less than optimal log stride selection. Code for reproduction from pylab import * # At this figure size there's room for two y... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | anntzer |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width