The toolbar keeps track of it's state with an internal stack, however I would not recommend directly accessing that. I am pretty sure that is considered a non-public api and can be broken at will.
Instead, when you construct your figure grab the xlim
and ylim
of the axes. Later you can loop over fig.axes
an check your self
lim_dict = dict()
for ax in fig.axes:
lim_dict[ax] = (ax.get_xlim(), ax.get_ylim())
def ax_changed(ax):
old_xlim, old_ylim = lim_dict[ax]
return np.all(old_xlim == ax.get_xlim()) and np.all(old_ylim == ax.get_ylim())
changed_axes = [ax for ax in figs.axes if ax_changed(ax)]
not_changed_axes = [ax for ax in figs.axes if not ax_changed(ax)]