Numeric tick labels above 1000 lose all decimals when zoomed in

Open Beginner friendly
#5,276 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
csharp

Research direction

Start by reading LabelFormatters.Numeric and the tick label formatting tests; the issue identifies the formatter’s N0 choice above magnitude 1000 as the cause. Reproduce with limits 1234.5 to 1234.6 under invariant culture, then check that zoomed-in ticks have distinct labels with needed decimals while whole numbers remain unchanged.

Written by the indexing model from the issue text.

Description

Issue: Zooming into values above 1000 makes the axis unreadable. With limits 1234.5 to 1234.6 and invariant culture, the default generator shows 20 ticks that all read 1,235.

ScottPlot Version: 5.1.59 (NuGet)

Code Sample:

ScottPlot.Plot myPlot = new();
myPlot.Axes.SetLimitsX(1234.5, 1234.6);
myPlot.SavePng("bug.png", 800, 600);

Cause: LabelFormatters.Numeric uses N0 whenever the magnitude exceeds 1000, whatever the tick spacing is.

LabelFormatter can be set by hand, as in #3605 reported by @swaitvor, but the default stays unreadable for anyone who zooms in, for example on a time axis in seconds after about 17 minutes of recording.

I saw that pull requests are paused, so this is only a note for when you are back. A small change that keeps the needed decimals and leaves whole numbers as they are gave ten distinct labels from 1,234.5 to 1,234.59 in a local test.

Disclosure: this text was written by Claude Code (Claude Opus 5.5). Claude Code and Codex (GPT-6 Astra) wrote the local change and ran the label check, its NUnit tests did not run. Reviewed by Codex (GPT-6 Astra) and Claude Code (Claude Opus 5.5). I read this text and decided to submit it.

Dominant language
C#
Stars
6.8k
Forks
1k
PR merge metrics
No merged PRs in 30d

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ScottPlot/ScottPlot

All issues in ScottPlot/ScottPlot

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.