xy.x_axis() / xy.y_axis() already accept tick_labels: Sequence[str] to pair with numeric tick_values, but xy.colorbar() only accepts numeric ticks: list[float] with no text-label equivalent.
We use xy.heatmap() to render a small set of discrete statuses (e.g. ok, expected_gap, unexpected_gap, unexpected_data) as banded colormap stops, following the pattern in docs/charts/heatmap.md's correlation-matrix example (xy.colorbar(title=..., ticks=[...])). The colorbar then shows the raw numeric band centers (e.g. 0.375, 1.125) instead of the status names — there's no way to label those ticks.
We understand xy.heatmap is intentionally continuous-only and that XY "deliberately emits no built-in colorbar for ... categorical color" per the colorbar docs — this isn't a request to make heatmap categorical. It's narrower: let xy.colorbar() take the same tick_labels parameter x_axis/y_axis already have, so a continuous scale with a small number of meaningful bands (like ours) can label its ticks instead of only showing positions.
Reproduction sketch:
import xy
chart = xy.heatmap_chart(
xy.heatmap([[0, 1], [2, 3]], colormap="viridis", domain=(0, 3)),
xy.colorbar(title="Status", ticks=[0.375, 1.125, 1.875, 2.625]),
)
# No way to render "ok" / "expected" / "unexpected" / "missing" at those
# tick positions -- xy.colorbar has no tick_labels param.
Environment: xy==0.0.6 (checked 0.0.7's changelog too -- not covered there).
xy.x_axis()/xy.y_axis()already accepttick_labels: Sequence[str]to pair with numerictick_values, butxy.colorbar()only accepts numericticks: list[float]with no text-label equivalent.We use
xy.heatmap()to render a small set of discrete statuses (e.g.ok,expected_gap,unexpected_gap,unexpected_data) as banded colormap stops, following the pattern indocs/charts/heatmap.md's correlation-matrix example (xy.colorbar(title=..., ticks=[...])). The colorbar then shows the raw numeric band centers (e.g.0.375,1.125) instead of the status names — there's no way to label those ticks.We understand
xy.heatmapis intentionally continuous-only and that XY "deliberately emits no built-in colorbar for ... categorical color" per the colorbar docs — this isn't a request to make heatmap categorical. It's narrower: letxy.colorbar()take the sametick_labelsparameterx_axis/y_axisalready have, so a continuous scale with a small number of meaningful bands (like ours) can label its ticks instead of only showing positions.Reproduction sketch:
Environment:
xy==0.0.6(checked0.0.7's changelog too -- not covered there).