Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Bug]: LogLocator sometimes draws fewer ticks than it can #29694

Copy link
Copy link
Closed
@anntzer

Description

@anntzer
Issue body actions

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_space())
# which could be placed e.g. at 10^0 and 10^4,
# but only one tick is drawn at 10^2.
figure(figsize=(5, 1)).add_subplot(yscale="log", ylim=(.5, 15000))

Actual outcome

See comment above.

Expected outcome

See comment above.

Additional information

I suspect that the formulas for stride and decades in LogLocator.tick_values() are faulty.

Operating system

any

Matplotlib Version

3.11.0.dev511+g0b7a88a967

Matplotlib Backend

any

Python version

3.13

Jupyter version

no

Installation

git checkout

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.