Skip to content

Commit d09ea3c

Browse files
authored
Merge pull request #39 from CSSFrancis/release/v0.4.0
2 parents 94b9c8e + e6630ee commit d09ea3c

13 files changed

Lines changed: 70 additions & 52 deletions

CHANGELOG.rst

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,66 @@ Fragment files in ``upcoming_changes/`` are assembled into this file by
1010

1111
.. towncrier release notes start
1212
13+
0.4.0 (2026-07-18)
14+
==================
15+
16+
New Features
17+
------------
18+
19+
- Added :meth:`~anyplotlib.axes.InsetAxes.indicate_point` — the point sibling of
20+
:meth:`~anyplotlib.axes.InsetAxes.indicate_region`: a circle-and-cross marker
21+
at a data point of the parent plot plus a single leader line to the inset's
22+
nearest corner, tracking zoom/pan and hiding the leader while minimized.
23+
- Added :meth:`~anyplotlib.plot1d.Plot1D.set_legend_fontsize` to control the
24+
legend text size on 1-D line plots.
25+
- Added ``linewidth=`` to every overlay widget constructor and ``add_*_widget``
26+
factory on :class:`~anyplotlib.plot2d.Plot2D` and
27+
:class:`~anyplotlib.plot1d.Plot1D` (rectangle, circle, annular, crosshair,
28+
polygon, vline, hline, range, point) — stroke width in px, default 2, stored
29+
and round-tripped like ``color``.
30+
- Added ``tint=`` to :meth:`~anyplotlib.plot2d.Plot2D.add_layer` and
31+
:meth:`~anyplotlib.plot2d.Layer.set` — a ``#rgb``/``#rrggbb`` hex colour that
32+
renders the layer as a clear→colour intensity ramp (transparent at low
33+
intensity, opaque tint at high, via a 256×4 RGBA LUT) instead of a named
34+
colormap; passing ``cmap=`` reverts a tinted layer to colormap display.
35+
- An :meth:`~anyplotlib.figure.Figure.add_inset` with no title (the default,
36+
``title=""``) now renders with NO title-bar strip at all — a clean bordered
37+
plot box, content filling the whole area, instead of a useless empty header.
38+
A titled inset is unchanged: its bar renders as before, with click-to-toggle
39+
minimize. A title-less inset has no minimize affordance (there is no bar to
40+
click), but drag-to-move / drag-to-resize in edit mode still work exactly as
41+
before, since those gestures are wired on the inset body, not the bar.
42+
- Double-clicking a plot's text chrome now reports which element was hit. The
43+
``double_click`` :class:`~anyplotlib.callbacks.Event` gains a ``target`` field
44+
naming the hit element — one of ``'title'``, ``'x_label'``, ``'x_ticks'``,
45+
``'y_label'``, ``'y_ticks'``, ``'colorbar_label'`` or ``'legend'`` — so a host
46+
can open the right edit affordance for the axis label vs the ticks vs the title
47+
vs the colorbar label vs the legend. The axis gutters, colorbar strip and title
48+
band each get their own hit-test (2-D panels emit from the separate axis/title
49+
canvases; 1-D panels zone-split the single canvas around the plot rect and
50+
legend box). A plain plot-area double-click is unchanged and carries no
51+
``target`` (``event.target is None``), so existing handlers keep working.
52+
- Insets can now be dragged and resized directly in the renderer's edit mode
53+
(``edit_chrome``): drag the body to move an inset (a corner-stacked inset
54+
converts to a free anchor and its siblings re-stack), or drag the bottom-right
55+
grip to resize it (min 64 px per dimension). On release the renderer emits a
56+
new figure-level ``inset_geometry_change`` event carrying the final
57+
``anchor``/``w_frac``/``h_frac`` (figure fractions), which
58+
:meth:`~anyplotlib.figure.Figure.add_event_handler` handlers can observe to
59+
persist the layout. The same geometry is applied programmatically via the new
60+
:meth:`~anyplotlib.axes.InsetAxes.set_geometry` (``anchor``, ``w_frac``,
61+
``h_frac``). Off edit mode the affordances are hidden and the inset is inert.
62+
63+
64+
Bug Fixes
65+
---------
66+
67+
- Fixed ``exportPNG`` compositing WebGPU-rendered 3-D panels (``scatter3d`` /
68+
``voxels``) as blank background rectangles — the 3-D render pass is now
69+
re-rendered synchronously in-task before the canvas readback, exactly like
70+
active-GPU 2-D image panels.
71+
72+
1373
0.3.0b1 (2026-07-13)
1474
====================
1575

docs/_root/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
<meta charset="utf-8" />
55
<title>anyplotlib – redirecting…</title>
66
<!-- Redirect to the latest dev docs. -->
7-
<meta http-equiv="refresh" content="0; url=v0.3.0/" />
8-
<link rel="canonical" href="v0.3.0/" />
7+
<meta http-equiv="refresh" content="0; url=v0.4.0/" />
8+
<link rel="canonical" href="v0.4.0/" />
99
</head>
1010
<body>
1111
<p>
12-
Redirecting to <a href="v0.3.0/">v0.3.0 documentation</a>
12+
Redirecting to <a href="v0.4.0/">v0.4.0 documentation</a>
1313
</p>
1414
</body>
1515
</html>

docs/_root/switcher.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
"version": "dev",
55
"url": "https://cssfrancis.github.io/anyplotlib/dev/"
66
},
7+
{
8+
"name": "v0.4.0 (stable)",
9+
"version": "v0.4.0",
10+
"url": "https://cssfrancis.github.io/anyplotlib/v0.4.0/"
11+
},
712
{
813
"name": "v0.3.0 (stable)",
914
"version": "v0.3.0",

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
project = "anyplotlib"
1818
copyright = "2026, anyplotlib contributors"
1919
author = "anyplotlib contributors"
20-
release = "0.3.0"
20+
release = "0.4.0"
2121

2222
# When built in CI the workflow sets DOCS_VERSION to the tag name (e.g.
2323
# "v0.1.0") or "dev". Fall back to "dev" for local builds.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ exclude = [
1313

1414
[project]
1515
name = "anyplotlib"
16-
version = "0.3.0"
16+
version = "0.4.0"
1717
description = "A plotting library using python, javascript and anywidget for performant in browser plotting."
1818
readme = "README.md"
1919
license = { text = "MIT" }

upcoming_changes/+double_click_targets.new_feature.rst

Lines changed: 0 additions & 10 deletions
This file was deleted.

upcoming_changes/+export_png_3d.bugfix.rst

Lines changed: 0 additions & 4 deletions
This file was deleted.

upcoming_changes/+indicate_point.new_feature.rst

Lines changed: 0 additions & 4 deletions
This file was deleted.

upcoming_changes/+inset_drag_resize.new_feature.rst

Lines changed: 0 additions & 10 deletions
This file was deleted.

upcoming_changes/+inset_no_title_bar.new_feature.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)