Skip to content

Make frequency labels readable at narrow and wide plot sizes - #15

Merged
marrabld merged 1 commit into
marrabld:mainfrom
ArianMoeini:fix/frequency-axis-labels
Oct 5, 2026
Merged

marrabld merged 1 commit into
marrabld:mainfrom
ArianMoeini:fix/frequency-axis-labels

Conversation

@ArianMoeini

Copy link
Copy Markdown
Contributor

Closes #12.

The default log axis labels nearly every grid line and applies an automatic kHz prefix, crowding low-frequency labels. A custom frequency axis keeps the log grid while choosing labels according to available pixel width. It uses Hz below 1 kHz and kHz above it. Both spectrum and correction plots share the axis; zoom and pan still use the existing plot view.

These screenshots use generated sample curves. The smallest window the current controls allow is 911 Γ— 606; the larger view is 1120 Γ— 800.

Window Before After
Small Small window before Small window after
Large Large window before Large window after

Validation: 12 tests passed; Ruff check and format passed. I also checked labels at plot widths of 320, 500, 800, and 1100 pixels and zoomed both plots to 800–4000 Hz.

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.

Make logarithmic frequency-axis labels readable at different window sizes

2 participants