Skip to content

feat: Add minorloglabels to cartesian axes #7468

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

Merged
merged 6 commits into from
Jul 17, 2025
Merged

feat: Add minorloglabels to cartesian axes #7468

merged 6 commits into from
Jul 17, 2025

Conversation

archmoj
Copy link
Contributor

@archmoj archmoj commented Jul 15, 2025

Supersedes #6120.

@archmoj archmoj added feature something new cs customer success labels Jul 15, 2025
@archmoj archmoj changed the title Add minorloglabels to cartesian axes feat: Add minorloglabels to cartesian axes Jul 15, 2025
@archmoj archmoj requested a review from alexcjohnson July 15, 2025 02:32
@alexcjohnson
Copy link
Collaborator

Personally I don't think these new options are what I would want as an alternative to the small digit - the small digit is a shorthand, but as an alternative I wouldn't want another arbitrary format, I'd want the same format used for the powers of ten but extended to multiples.

The behavior I'd want:

  • if the power of ten is shown as 0.1, 1, 10 etc (as it is by default): minor labels 0.2, 0.5, 2, 5, 20, 50 etc.
  • If the power of ten is 100, 1k, 10k: minor labels 200, 500, 2k, 5k, 20k...
  • If the power of ten is 10^2, 10^3, 10^4: minor labels 2x10^2, 5x10^2, 2x10^3, 5x10^3
  • If the power of ten is 1e2, 1e3, 1e4: minor labels 2e2, 5e2, 2e3, 5e3...

Basically for all cases except 10^N where you have to put Dx10^N, I'd want the minor labels to simply replace the 1 in the next lower power of ten with the appropriate digit.

While we're at it, another thing people might want is to not show the minor labels at all, just the minor gridlines - so you could set nticks very large and get a lot of gridlines like you see on log-scale graph paper but a manageable number of labels. So for the new attribute perhaps minorloglabels = 'small digit' | 'complete' | 'none'?

@archmoj archmoj self-assigned this Jul 16, 2025
@archmoj
Copy link
Contributor Author

archmoj commented Jul 16, 2025

Thank you @alexcjohnson for the suggestion.
Please review the revised PR.

Copy link
Collaborator

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

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

💃 Beautiful!

@archmoj archmoj merged commit bf6909b into master Jul 17, 2025
6 checks passed
@archmoj archmoj deleted the loglabels branch July 17, 2025 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cs customer success feature something new
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants