Summary
On an interactive scatter chart in a Jupyter notebook, doing a box zoom ~3 times in a row and then zooming out corrupts the view transform: the axis scale goes completely wrong and the point cloud collapses into a horizontal line. The chart does not recover a sane domain on zoom-out.
Repro
Rendered in a notebook (playground.ipynb, editable install of main @ 541a7da):
import numpy as np
import xy
from IPython.display import display
rng = np.random.default_rng(42)
m2 = 20_000
sx = rng.normal(0, 1, m2)
sy = sx * 0.5 + rng.normal(0, 0.6, m2)
cvals = sx**2 + sy**2
svals = np.abs(rng.normal(size=m2))
display(
xy.scatter_chart(
xy.scatter(x=sx, y=sy, color=cvals, size=svals, colormap="viridis", size_range=(3, 18), opacity=0.7),
title="xy — 20k scatter, color + size encoded",
width=900,
height=340,
)
)
Steps:
- Render the chart above.
- Box-zoom into the data three times in succession (progressively deeper).
- Zoom out.
Actual: the scale is completely wrong after the zoom-out; the scatter shrinks/flattens to a horizontal line.
Expected: zooming out walks back to a sane domain; the aspect/scale of the data is preserved at every step.
Notes
- Suspect the accumulated view-transform math on repeated box zooms — possibly the f32 offset re-centering path (dossier §16) or domain bookkeeping in
js/src/53_interaction.js (box zoom vs. center-anchored zoom-out).
- The y-domain collapsing to ~zero height ("horizontal line") suggests a degenerate domain is being computed on the zoom-out step rather than inverting the prior box zooms.
Environment: Linux, Chromium-based browser, Jupyter notebook, xy editable install of main @ 541a7da (native kernel backend).
Summary
On an interactive scatter chart in a Jupyter notebook, doing a box zoom ~3 times in a row and then zooming out corrupts the view transform: the axis scale goes completely wrong and the point cloud collapses into a horizontal line. The chart does not recover a sane domain on zoom-out.
Repro
Rendered in a notebook (playground.ipynb, editable install of main @ 541a7da):
Steps:
Actual: the scale is completely wrong after the zoom-out; the scatter shrinks/flattens to a horizontal line.
Expected: zooming out walks back to a sane domain; the aspect/scale of the data is preserved at every step.
Notes
js/src/53_interaction.js(box zoom vs. center-anchored zoom-out).Environment: Linux, Chromium-based browser, Jupyter notebook,
xyeditable install ofmain@ 541a7da (native kernel backend).