MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / update_datalim

Method update_datalim

lib/matplotlib/axes/_base.py:2680–2703  ·  view source on GitHub ↗

Extend the `~.Axes.dataLim` Bbox to include the given points. If no data is set currently, the Bbox will ignore its limits and set the bound to be the bounds of the xydata (*xys*). Otherwise, it will compute the bounds of the union of its current data and the data i

(self, xys, updatex=True, updatey=True)

Source from the content-addressed store, hash-verified

2678 self._update_collection_limits(artist)
2679
2680 def update_datalim(self, xys, updatex=True, updatey=True):
2681 """
2682 Extend the `~.Axes.dataLim` Bbox to include the given points.
2683
2684 If no data is set currently, the Bbox will ignore its limits and set
2685 the bound to be the bounds of the xydata (*xys*). Otherwise, it will
2686 compute the bounds of the union of its current data and the data in
2687 *xys*.
2688
2689 Parameters
2690 ----------
2691 xys : 2D array-like
2692 The points to include in the data limits Bbox. This can be either
2693 a list of (x, y) tuples or a (N, 2) array.
2694
2695 updatex, updatey : bool, default: True
2696 Whether to update the x/y limits.
2697 """
2698 xys = np.asarray(xys)
2699 if not np.any(np.isfinite(xys)):
2700 return
2701 self.dataLim.update_from_data_xy(xys, self.ignore_existing_data_limits,
2702 updatex=updatex, updatey=updatey)
2703 self.ignore_existing_data_limits = False
2704
2705 def _process_unit_info(self, datasets=None, kwargs=None, *, convert=True):
2706 """

Callers 14

_update_patch_limitsMethod · 0.95
set_extentMethod · 0.45
__init__Method · 0.45
_update_image_limitsMethod · 0.45
axlineMethod · 0.45
hlinesMethod · 0.45
vlinesMethod · 0.45
eventplotMethod · 0.45
hexbinMethod · 0.45
_update_pcolor_limsMethod · 0.45
pcolorfastMethod · 0.45

Calls 1

update_from_data_xyMethod · 0.80

Tested by

no test coverage detected