Skip to content
16 changes: 16 additions & 0 deletions python/xy/pyplot/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3879,6 +3879,21 @@ def numeric_or_categorical(values: Any) -> np.ndarray:
for entry in host._entries:
if axis == "y" and entry.get("y_axis", "y") != y_axis:
continue
if entry.get("_quiver_key_recipe") is not None:
# QuiverKey is an Artist offset in axes/figure/data display
# coordinates; Matplotlib never lets it change dataLim.
continue
quiver_recipe = entry.get("_quiver_recipe")
if quiver_recipe is not None:
# Quiver.get_datalim contributes only its offset locations,
# not the display-sized arrow polygons. Keep that invariant
# after materialization expands the entry into shaft/head
# segments outside the data-position extent.
key = "x" if axis == "x" else "y"
scale_key = "y2" if axis == "y" and self._y2_of is not None else axis
values = _scale_values(quiver_recipe[key], host._scale_specs[scale_key])
yield np.asarray(values, dtype=np.float64).reshape(-1), True
continue
if entry.get("kind") == "@axline":
# Matplotlib includes only untransformed defining points in
# data limits (one anchor for slope form, both for two-point
Expand Down Expand Up @@ -7233,6 +7248,7 @@ def _build_chart(self, width: int, height: int) -> Any:
if self._chart is not None:
return self._chart
self._materialize_insets()
self._materialize_quiver_geometry(width, height)
chart_padding = (
self._frame_padding(width, height) if self._padding is None else list(self._padding)
)
Expand Down
Loading
Loading