Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,71 @@ Fragment files in ``upcoming_changes/`` are assembled into this file by

.. towncrier release notes start

0.5.0 (2026-07-26)
==================

New Features
------------

- :meth:`Widget.set` takes ``_notify=False`` to move a widget without firing
``pointer_move`` callbacks, so a handler that writes back to its own widget no
longer feeds into itself. Widgets also gained a
:meth:`~anyplotlib.widgets.Widget.remove` method.
- :meth:`~anyplotlib.Plot1D.add_range_widget` takes ``orientation="vertical"``
for a band that selects a range of values, and ``snap_values`` to restrict a
drag to a set of allowed positions (matplotlib's
``SpanSelector.snap_values``). ``snap_values`` is also available on the
vline, hline and point widgets.
- Added :meth:`~anyplotlib.Plot2D.set_scalebar_style` to recolour the automatic
scale bar, which was hardcoded white on a translucent dark pill and unreadable
over a light image. ``bgcolor="none"`` drops the pill entirely.
- Added ``linestyle="none"`` (also spelled ``"None"``) for a series drawn as
markers with no connecting line — matplotlib's scatter idiom,
``ax.plot(y, linestyle="none", marker="o")``. An explicit ``linewidth=0``
now means the same thing; it previously fell back to the 1.5 default in the
renderer.
- Added three 2-D overlay widget kinds: ``line``
(:meth:`~anyplotlib.Plot2D.add_line_widget`), a bare two-endpoint segment for
line profiles and two-point measurements, and ``vline`` / ``hline``, full-height
and full-width rules grabbable anywhere along their length.
- Clicking a 1-D panel now emits a ``pointer_down`` event carrying the clicked
position as ``xdata``/``ydata``, matching 2-D panels; it previously fired only
when the click landed on a line. Clicks on a line still report ``line_id``,
so existing line-click handlers are unaffected.
- Panels expose their geometry through :meth:`~anyplotlib.Plot1D.plot_box`,
:meth:`~anyplotlib.Plot1D.data_to_display` and
:meth:`~anyplotlib.Plot1D.display_to_data`, so callers working in display space
no longer have to re-derive the renderer's layout constants and letterbox maths
themselves.
- Sized marker types take ``size_units="px"`` so their radii and widths stay
fixed in screen pixels through a zoom instead of scaling with the data — what
a marker standing in for a *point* wants, and what matplotlib does by sizing
scatter markers in display points.
- ``edgecolors`` and ``facecolors`` accept a sequence of colours parallel to the
markers — matplotlib's ``edgecolors=[...]`` / scatter ``c=[...]`` — for every
marker type on both 1-D and 2-D panels, where previously only ``points`` and
``polygons`` on 1-D panels honoured it. A short sequence cycles.


Bug Fixes
---------

- A ``crosshair`` widget can now be grabbed anywhere along either of its rules
rather than only at the one-pixel centre hotspot; grabbing a rule constrains
the drag to that rule's own axis.
- The 1-D y-axis label is no longer drawn through the tick numbers; its position
was a fixed fraction of the left gutter and is now measured against the widest
tick string.
- The colorbar strip is no longer drawn flush against the image: there is now a
6 px gap, taken out of the image width so the strip cannot be pushed off the
panel, and settable with :meth:`~anyplotlib.Plot2D.set_colorbar_pad`. This
shifts every colorbar plot by 4 px.
- ``save_html`` / ``to_html`` / ``figure_state`` now capture overlay widgets at
their current positions; widget moves reach JS as targeted events that never
rewrite the panel traits, so a snapshot used to show every widget where it was
created.


0.4.1 (2026-07-26)
==================

Expand Down
6 changes: 3 additions & 3 deletions docs/_root/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<meta charset="utf-8" />
<title>anyplotlib – redirecting…</title>
<!-- Redirect to the latest dev docs. -->
<meta http-equiv="refresh" content="0; url=v0.4.2/" />
<link rel="canonical" href="v0.4.2/" />
<meta http-equiv="refresh" content="0; url=v0.5.0/" />
<link rel="canonical" href="v0.5.0/" />
</head>
<body>
<p>
Redirecting to <a href="v0.4.2/">v0.4.2 documentation</a>…
Redirecting to <a href="v0.5.0/">v0.5.0 documentation</a>…
</p>
</body>
</html>
Expand Down
5 changes: 5 additions & 0 deletions docs/_root/switcher.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
"version": "dev",
"url": "https://cssfrancis.github.io/anyplotlib/dev/"
},
{
"name": "v0.5.0 (stable)",
"version": "v0.5.0",
"url": "https://cssfrancis.github.io/anyplotlib/v0.5.0/"
},
{
"name": "v0.4.2 (stable)",
"version": "v0.4.2",
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
project = "anyplotlib"
copyright = "2026, anyplotlib contributors"
author = "anyplotlib contributors"
release = "0.4.2"
release = "0.5.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.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ exclude = [

[project]
name = "anyplotlib"
version = "0.4.2"
version = "0.5.0"
description = "A plotting library using python, javascript and anywidget for performant in browser plotting."
readme = "README.md"
license = { text = "MIT" }
Expand Down
4 changes: 0 additions & 4 deletions upcoming_changes/+colorbar-gap.bugfix.rst

This file was deleted.

5 changes: 0 additions & 5 deletions upcoming_changes/+coord-api.new_feature.rst

This file was deleted.

3 changes: 0 additions & 3 deletions upcoming_changes/+crosshair-grab.bugfix.rst

This file was deleted.

4 changes: 0 additions & 4 deletions upcoming_changes/+export-widget-sync.bugfix.rst

This file was deleted.

4 changes: 0 additions & 4 deletions upcoming_changes/+line-rule-widgets.new_feature.rst

This file was deleted.

5 changes: 0 additions & 5 deletions upcoming_changes/+linestyle-none.new_feature.rst

This file was deleted.

4 changes: 0 additions & 4 deletions upcoming_changes/+marker-size-units.new_feature.rst

This file was deleted.

4 changes: 0 additions & 4 deletions upcoming_changes/+per-marker-colors.new_feature.rst

This file was deleted.

4 changes: 0 additions & 4 deletions upcoming_changes/+pointer-down-1d.new_feature.rst

This file was deleted.

5 changes: 0 additions & 5 deletions upcoming_changes/+range-orientation-snap.new_feature.rst

This file was deleted.

3 changes: 0 additions & 3 deletions upcoming_changes/+scalebar-style.new_feature.rst

This file was deleted.

4 changes: 0 additions & 4 deletions upcoming_changes/+widget-notify-remove.new_feature.rst

This file was deleted.

3 changes: 0 additions & 3 deletions upcoming_changes/+ylabel-clearance.bugfix.rst

This file was deleted.

Loading