aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Scholten2025-10-30 15:18:35 +1000
committerSam Scholten2025-10-30 15:18:35 +1000
commit644676e661f2312f5262c49e1e3bb8a201a1c0d9 (patch)
treef39b1857a05d47bd58ad38986fdcdb9a60335699
parent2c0433eef33c3419c410ce2dc4151d2af8b20cf8 (diff)
downloadscopekit-644676e661f2312f5262c49e1e3bb8a201a1c0d9.tar.gz
scopekit-644676e661f2312f5262c49e1e3bb8a201a1c0d9.zip
Fix: Ensure axis time unit label is correct after initial renderv1.0.5
The x-axis label was using the time unit calculated from the entire data span, but after render() the optimal unit is recalculated based on the actual view span. Add explicit call to _update_axis_formatting() after _update_plot_data() to ensure the label reflects the correct time unit for the displayed view.
-rw-r--r--pyproject.toml2
-rw-r--r--src/scopekit/plot.py1
2 files changed, 2 insertions, 1 deletions
diff --git a/pyproject.toml b/pyproject.toml
index 4877e93..8daf02f 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "scopekit"
-version = "1.0.4"
+version = "1.0.5"
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/plot.py b/src/scopekit/plot.py
index f405432..0b96722 100644
--- a/src/scopekit/plot.py
+++ b/src/scopekit/plot.py
@@ -1549,6 +1549,7 @@ class OscilloscopePlot:
# This will also update the legend and regions
self.state.set_updating(False) # Ensure not in updating state for first call
self._update_plot_data(self.ax)
+ self._update_axis_formatting()
self.fig.canvas.draw_idle()
print("Plot rendering complete.")