Creating a certain plot is a lot of work, so I would like to automate this by create a function f()
that returns a figure.
I would like to call this function so that I can put the result in a subplot. Is there anyway I can do this? Below is some psuedo code explaining what I mean
figure_of_interest = f()
fig,ax = plt.subplots(nrows = 4,cols = 1)
ax[1].replace_with(figure_of_interest)