From fb256f5add760d891835c89ac26387cc4e2bac12 Mon Sep 17 00:00:00 2001 From: Sam Scholten Date: Thu, 30 Oct 2025 15:31:14 +1000 Subject: Fix: Show whole numbers for seconds labels to be less verbose Previously seconds were displayed with 3 decimal places (e.g., 10.142s) which was unnecessarily verbose for large time spans. Now displays as whole numbers (e.g., 10s), which is more appropriate when viewing recordings at the seconds scale where millisecond precision isn't meaningful. --- pyproject.toml | 2 +- src/scopekit/display_state.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 8daf02f..0e83725 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "scopekit" -version = "1.0.5" +version = "1.0.6" description = "General-purpose oscilloscope plotting components." authors = [{ name = "Sam Scholten", email = "s.scholten@uq.edu.au" }] requires-python = ">=3.8" diff --git a/src/scopekit/display_state.py b/src/scopekit/display_state.py index 793bc4c..923eb6c 100644 --- a/src/scopekit/display_state.py +++ b/src/scopekit/display_state.py @@ -136,7 +136,7 @@ def _create_time_formatter( elif display_scale >= np.float32(1e3): # milliseconds return f"{x:.1f}" else: # seconds - return f"{x:.3f}" + return f"{x:.0f}" return FuncFormatter(formatter) -- cgit v1.2.3