Skip to content

Fix invalid 'minor xticklabels' PGFPlots key#56

Merged
ErwindeGelder merged 1 commit intoErwindeGelder:mainfrom
krishna-ji:fix/issue-51-minor-ticklabels
Mar 23, 2026
Merged

Fix invalid 'minor xticklabels' PGFPlots key#56
ErwindeGelder merged 1 commit intoErwindeGelder:mainfrom
krishna-ji:fix/issue-51-minor-ticklabels

Conversation

@krishna-ji
Copy link
Copy Markdown
Collaborator

Fixes #51

Problem

PGFPlots does not support \minor xticklabels\ or \minor yticklabels\ as axis options. The _get_ticks()\ function was generating these invalid keys when minor tick labels were present, causing LaTeX compilation errors:

\
! Package pgfkeys Error: I do not know the key '/tikz/minor xticklabels'
\\

Fix

Skip ticklabel generation ({xy}ticklabels=...) for minor ticks while still allowing minor tick positions (\minor xtick=...) to be set. This is done by checking \is_minor = 'minor' in xy\ and gating the label-related code on
ot is_minor.

All tests pass (113/113), ruff and mypy clean.

PGFPlots does not support 'minor xticklabels' or 'minor yticklabels' as axis
options. The _get_ticks() function was generating these invalid keys when minor
tick labels were present, causing LaTeX compilation errors:

  ! Package pgfkeys Error: I do not know the key '/tikz/minor xticklabels'

Skip ticklabel generation for minor ticks while still allowing minor tick
positions to be set.
@ErwindeGelder ErwindeGelder merged commit 7913c7d into ErwindeGelder:main Mar 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

unknown key /tikz/minor xticklabels

2 participants