aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Scholten2025-10-30 15:31:14 +1000
committerSam Scholten2025-10-30 15:31:14 +1000
commitfb256f5add760d891835c89ac26387cc4e2bac12 (patch)
tree7fff52e17aa88ee14897bd1f4144c0d8837aa646
parent644676e661f2312f5262c49e1e3bb8a201a1c0d9 (diff)
downloadscopekit-fb256f5add760d891835c89ac26387cc4e2bac12.tar.gz
scopekit-fb256f5add760d891835c89ac26387cc4e2bac12.zip
Fix: Show whole numbers for seconds labels to be less verbosev1.0.6
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.
-rw-r--r--pyproject.toml2
-rw-r--r--src/scopekit/display_state.py2
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)