diff --git a/CHANGELOG.rst b/CHANGELOG.rst index fe8c3733a..65bce25fc 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -10,6 +10,55 @@ Fragment files in ``upcoming_changes/`` are assembled into this file by .. towncrier release notes start +0.8.0 (2026-08-25) +================== + +API and Behaviour Changes +------------------------- + +- In tile mode, ``set_data``/``update_tile_source`` now re-derive the quantisation band + ``raw_min``/``raw_max`` from the incoming frame when the current band is unset or + degenerate (it previously stayed as first derived, even from a flat placeholder). A + band that is already valid is still never re-derived, so a contrast change keeps + re-windowing in the LUT with no pixel re-encode. One visible consequence: a tiled plot + born on a placeholder now quantises subsequent frames over the frame's own range + rather than the display window, matching what ``imshow`` of a large frame has always + done — so its wire bytes can differ by a rounding step from the equivalent untiled + plot, while the displayed image is unchanged. (`#60 `_) + + +New Features +------------ + +- Added :meth:`~anyplotlib.plot2d.Plot2D.set_tile_band` to pin the fixed quantisation + band tile bytes are encoded over, for a consumer that already knows the honest range + (a camera's bit depth, a detector's saturation point) or whose source starts flat and + so has no range to auto-derive. It re-samples the overview and any active detail tile + over the new band in a single push, replacing the practice of reaching into + ``plot._state["raw_min"/"raw_max"]`` and calling ``update_tile_source()`` by hand. (`#60 `_) +- Added :meth:`~anyplotlib.plot2d.Plot2D.set_display_window`, which moves the + contrast window without re-quantising the pixels — the non-destructive + counterpart to :meth:`~anyplotlib.plot2d.Plot2D.set_clim`, and what lets a + saved page be re-windowed with no Python behind it. (`#61 `_) + + +Bug Fixes +--------- + +- Fixed a tiled 2-D image rendering solid black when tile mode was entered on a flat + placeholder frame (e.g. ``imshow`` of zeros before real data exists). The fixed + quantisation band ``raw_min``/``raw_max`` was derived from that placeholder — a + degenerate ``(0, 0)`` — and no later ``set_data`` re-derived it, leaving the two ends + of the protocol disagreeing about what it meant: the Python encoder treats a + degenerate band as unset and quantises over the display window, while the renderer + honoured ``(0, 0)`` and mapped every code below the display floor. The panel rendered + black on the WebGPU and Canvas2D paths alike, beside perfectly healthy stats and + histograms, with no warning. ``set_data`` and ``update_tile_source`` now re-derive a + degenerate band from the incoming frame, and the renderer falls back to the display + window for a degenerate band in tile mode — in the image LUT and in the colorbar + tick placement, which read the band the same way. (`#60 `_) + + 0.7.3 (2026-08-13) ================== diff --git a/docs/_root/index.html b/docs/_root/index.html index 47cd9cddd..03343dbb8 100644 --- a/docs/_root/index.html +++ b/docs/_root/index.html @@ -4,12 +4,12 @@ anyplotlib – redirecting… - - + +

- Redirecting to v0.7.3 documentation… + Redirecting to v0.8.0 documentation

diff --git a/docs/_root/switcher.json b/docs/_root/switcher.json index 73271127c..ab5eceebe 100644 --- a/docs/_root/switcher.json +++ b/docs/_root/switcher.json @@ -4,6 +4,11 @@ "version": "dev", "url": "https://cssfrancis.github.io/anyplotlib/dev/" }, + { + "name": "v0.8.0 (stable)", + "version": "v0.8.0", + "url": "https://cssfrancis.github.io/anyplotlib/v0.8.0/" + }, { "name": "v0.7.3 (stable)", "version": "v0.7.3", diff --git a/docs/conf.py b/docs/conf.py index 159d9b05f..f3b7c76a2 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -17,7 +17,7 @@ project = "anyplotlib" copyright = "2026, anyplotlib contributors" author = "anyplotlib contributors" -release = "0.7.3" +release = "0.8.0" # When built in CI the workflow sets DOCS_VERSION to the tag name (e.g. # "v0.1.0") or "dev". Fall back to "dev" for local builds. diff --git a/pyproject.toml b/pyproject.toml index 61484ab0d..ecc99746a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,7 +13,7 @@ exclude = [ [project] name = "anyplotlib" -version = "0.7.3" +version = "0.8.0" description = "A plotting library using python, javascript and anywidget for performant in browser plotting." readme = "README.md" license = { text = "MIT" } diff --git a/upcoming_changes/60.api_change.rst b/upcoming_changes/60.api_change.rst deleted file mode 100644 index b4eaa6fb9..000000000 --- a/upcoming_changes/60.api_change.rst +++ /dev/null @@ -1,9 +0,0 @@ -In tile mode, ``set_data``/``update_tile_source`` now re-derive the quantisation band -``raw_min``/``raw_max`` from the incoming frame when the current band is unset or -degenerate (it previously stayed as first derived, even from a flat placeholder). A -band that is already valid is still never re-derived, so a contrast change keeps -re-windowing in the LUT with no pixel re-encode. One visible consequence: a tiled plot -born on a placeholder now quantises subsequent frames over the frame's own range -rather than the display window, matching what ``imshow`` of a large frame has always -done — so its wire bytes can differ by a rounding step from the equivalent untiled -plot, while the displayed image is unchanged. diff --git a/upcoming_changes/60.bugfix.rst b/upcoming_changes/60.bugfix.rst deleted file mode 100644 index 7970ceea6..000000000 --- a/upcoming_changes/60.bugfix.rst +++ /dev/null @@ -1,12 +0,0 @@ -Fixed a tiled 2-D image rendering solid black when tile mode was entered on a flat -placeholder frame (e.g. ``imshow`` of zeros before real data exists). The fixed -quantisation band ``raw_min``/``raw_max`` was derived from that placeholder — a -degenerate ``(0, 0)`` — and no later ``set_data`` re-derived it, leaving the two ends -of the protocol disagreeing about what it meant: the Python encoder treats a -degenerate band as unset and quantises over the display window, while the renderer -honoured ``(0, 0)`` and mapped every code below the display floor. The panel rendered -black on the WebGPU and Canvas2D paths alike, beside perfectly healthy stats and -histograms, with no warning. ``set_data`` and ``update_tile_source`` now re-derive a -degenerate band from the incoming frame, and the renderer falls back to the display -window for a degenerate band in tile mode — in the image LUT and in the colorbar -tick placement, which read the band the same way. diff --git a/upcoming_changes/60.new_feature.rst b/upcoming_changes/60.new_feature.rst deleted file mode 100644 index f6acfd265..000000000 --- a/upcoming_changes/60.new_feature.rst +++ /dev/null @@ -1,6 +0,0 @@ -Added :meth:`~anyplotlib.plot2d.Plot2D.set_tile_band` to pin the fixed quantisation -band tile bytes are encoded over, for a consumer that already knows the honest range -(a camera's bit depth, a detector's saturation point) or whose source starts flat and -so has no range to auto-derive. It re-samples the overview and any active detail tile -over the new band in a single push, replacing the practice of reaching into -``plot._state["raw_min"/"raw_max"]`` and calling ``update_tile_source()`` by hand. diff --git a/upcoming_changes/61.new_feature.rst b/upcoming_changes/61.new_feature.rst deleted file mode 100644 index 4853cd82c..000000000 --- a/upcoming_changes/61.new_feature.rst +++ /dev/null @@ -1,4 +0,0 @@ -Added :meth:`~anyplotlib.plot2d.Plot2D.set_display_window`, which moves the -contrast window without re-quantising the pixels — the non-destructive -counterpart to :meth:`~anyplotlib.plot2d.Plot2D.set_clim`, and what lets a -saved page be re-windowed with no Python behind it.