You are reading documentation for the unreleased version of Matplotlib. Try searching for the released version of this page instead?
Version 3.0.2.post1071+g22649b6e8
Fork me on GitHub


Axes.update_datalim(xys, updatex=True, updatey=True)

Extend the 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 in xys.

xys : 2D array-like

The points to include in the data limits BBox. This can be either a list of (x, y) tuples or a Nx2 array.

updatex, updatey : bool, optional, default True

Whether to update the x/y limits.