Issue 1:
Bug summary

Updating the plot stack via toolbar.update() and toolbar.push_current() breaks the behaviour of fig.set_tight_layout().

"reset original view" makes the plot expand outside the viewable area.

"reset" from "configure subplots" corrects it, but pressing "home" again re-breaks it.

Code for reproduction

import matplotlib.pyplot as plt
import matplotlib as mpl

mpl.use('TKAgg')

x1 = [1, 2, 3, 4, 5, 6]
y1 = [3, 4, 5, 6, 7, 8]

x2 = [2, 3, 4, 5, 6, 7]
y2 = [8, 7, 6, 5, 4, 3]

# do all the plot setup
fig, ax = plt.subplots(1, 1)
toolbar = fig.canvas.manager.toolbar
fig.set_tight_layout(True)
ax.margins(x=0)

# plot data - this really happens by the user choosing a dataset to plot
line, = ax.plot(x1, y1, marker="o", label="data")
ax.set_xlabel("X ordinate")

# zoom in - this really happens by user interaction with the zoom tool
ax.set_xlim(2.5, 5.5)
ax.set_ylim(3, 6)

# save the current zoom for restoring later
old_x_lim = ax.get_xlim()
old_y_lim = ax.get_ylim()

# replace data - this really happens by the user choosing new data to plot
line.set_data(x2, y2)

# let matplotlib calculate the optimal axes settings for the new data
ax.relim()
ax.autoscale()

# restore the zoom so the new data is plotted in the same view as the old
toolbar.update() # Clear the axes stack
toolbar.push_current() # save the current status as home
ax.set_xlim(old_x_lim)
ax.set_ylim(old_y_lim)

# show the plot - this really happens by the program calling things
plt.show()

#Now when I click the "home" button, the axes expand to put the axis titles and ticks off-screen, and
# if I keep clicking "home", the move around. Clicking "reset" in the "configure subplots" menu puts everything right.

Actual outcome

After running the above code and pressing the "home" / "Reset original view" button once:

Furthermore, if there is an x-axis title, and the home button is clicked multiple times, the plot becomes smaller and smaller in the vertical direction, like:

and eventually I get a UserWarning:

C:\Users\_______\AppData\Local\Programs\Python\Python39\lib\tkinter\__init__.py:814: UserWarning: Tight layout not applied. The bottom and top margins cannot be made large enough to accommodate all axes decorations.
func(*args)

and tight_layout is removed. After this, all functionality appears to be normal.

Expected outcome

The expected outcome, after pressing the home button, looks like

And continuing to press the home button should not further alter the view.

Additional information

This only happens when tight layout is set to True.

The vertical shrinking only happens when there is an X axis label.

There is no horizontal shrinking when a y axis label is set.

The same behaviour was observed in 3.4.3

Behaviour persists in TKAgg, QtAgg, Qt5Agg, wxAgg

Operating system

Windows 10

Matplotlib Version

3.5.1

Matplotlib Backend

TKAgg

Python version

3.9.4

Jupyter version

No response

Installation

pip

Issue 2:
This might not be a bug but I doubt that it is an intended behavior. figure.clf() don't change the subplot parameters to any default values so it is not enough to do figure.clf() when testing to plot with or without for example tight_layout . This is easy to fix by adding for example:

keys = ('left', 'right', 'bottom','top','wspace','hspace')
subplots_default = {key : rcParams['figure.subplot.' + key] for key in keys}
self.subplotpars.update(**subplots_default)

to figure.clf()

When I looked into this I also found that the docstrings for subplots_adjust and SubplotParams are kind of confusing and not really correct. The default is, except in SuplotParams.__ini__ (that most people probably newer use directly), not the rc parameters that it seems but the actual attributes in the SuplotParams object. So it is not trivial to start all over with the default rc variables after a change in the subplotparameters by for example tight_layout.

Would it be good to add an option in subplot_adjust to adjust to the default parameters?

Would it be good to add a get function for the subplotparameters?

The documentation should probably be changed anyway. Are there any method to avoid writing almost the same things several times? figure.subplots_adjust and plt.subplots_adjust should have more or less the exact same docstring and the SuplotParams should also have a similar one.