Chart: log10 Y axis

Open
#72 0 comments 0 reactions 1 assignee View on GitHub

@mrcsin is already working on this.

Since Sep 10, 2026.

Assessment

This issue has not been assessed yet.

Description

enhancement

Why

Pressure spans four decades and shares a screen with values that do not. A linear axis makes one of them unreadable.

Today

The model supports it and the render does not.

  • PenScaleSettings.IsLogarithmic (Core/Trends/PenScaleSettings.cs:8) flows into PenScale.IsLogarithmic (Core/Trends/PenScale.cs:11), and PenScaleModel does the sanitizing: non-positive values dropped from the widen (PenScaleModel.cs:156-158), a non-positive manual bound clamped (:87-92), a positive fallback range (:215-217). All of it is unit-tested.
  • Nothing outside the model reads the flag. ChartAxisBinder applies a linear SetLimitsY and nothing else (Chart/ChartAxisBinder.cs:30).
  • No production code sets the flag true; every assignment is in PenScaleModelTests. Under the house rules that makes the whole path dead surface today, and docs/plans/20260902-platform-audit-findings.md:82-85 proposes deleting it.

docs/architecture/trend-feature-spec.md:74-77 (AY-6, SHOULD) says the opposite: the mode must reach the render and be reachable from the UI.

This issue is the decision that the audit finding was waiting for: log10 ships, so the model path stays.

Wanted

  • A per-pen log toggle in the UI, and a stored default alongside the other pen settings (#65).
  • The axis renders logarithmically: log ticks, log minor ticks, and the line placed by the same transform.
  • Non-positive samples are handled visibly rather than silently: they cannot be drawn on a log axis, and dropping them without a word turns a vacuum reading of zero into a hole nobody explains.

Implementation choice, to be made in the plan

ScottPlot 5.1.59 has no log axis and the repository has no transform seam. EnvelopeLine.Render projects each point with Axes.GetPixel directly (Chart/EnvelopeLine.cs:94). Three candidates, each breaking something different:

Where Cost
Transform Y inside EnvelopePath.Build / EnvelopeLine.Render Ticks and labels still linear, need their own generator
A ScottPlot IYAxis with a log tick generator Most native, most unknowns in a version without log support
Feed log10(y) columns at load in TrendPenState.LoadHistory Breaks the cursor readout, which reads untransformed Center (Chart/ChartCursorReader.cs:11-19), and the delta readout with it
Dominant language
C#
Stars
0
Forks
0
Avg merge
18m
Merged PRs (30d)
42

Contributor guide

No contributing guide indexed for this repository

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 Semiteq/SemiPlot

All issues in Semiteq/SemiPlot

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.