matplotlib.axes.Axes.relim

Axes.relim(self, visible_only=False)

Recompute the data limits based on current artists.

At present, Collection instances are not supported.

Parameters:
visible_onlybool

Whether to exclude invisible artists. Defaults to False.