Reuse/share one axes of a figure in another figure

Hello,

I am wondering if it is possible to reuse an axes from one figure in another figure.

Consider the following case:
First generate a figure with three axes:

import matplotlib.pyplot as plt
fig, (ax1,ax2,ax3) = plt.subplots(3,1)

Then add, e.g., plot, title, etc to ax1 and save the figure:

ax1.plot(...)
ax1.set(...)
fig.savefig(...)

Now I would like to generate a second figure showing all the things done to ax1.
I tried the following:

figNEW, axNEW = plt.subplots()
axNEW=ax1
figNEW.savefig(...)

But this is not working (the saved figure is showing only an empty graph).

So, is it in principle possible to share axes? How should I do this?

Many thanks in advance!

It is not possible to move or copy an Axes to a second Figure.

Regardless of that, this line:

does not even attempt to do that. All you’ve done is change what object the variable is pointing to. It wouldn’t have affected the second Figure in any way even if it were possible.