Is there a way to nest already created figures inside a new figure in matplotlib so that they appear side to side?
Here is how I create my figures. I use pypianoroll library to plot my figures. generate_random_multitrack is just to create random examples.
import numpy as np
from pypianoroll import Multitrack, Track
def generate_random_multitrack():
prs = np.random.randint(128, size=(3, 16, 128))
tracks = []
for pr in prs:
tracks.append(
Track(pianoroll=pr)
)
return Multitrack(tracks=tracks)
mt1 = generate_random_multitrack()
mt2 = generate_random_multitrack()
for example mt1.plot() returns a list of axes and creates this figure

I would like to have something like this, where mt1 is on the left, mt2 is on the right

I can access the figures and axes created by .plot call with
axes1 = mt1.plot()
fig1 = plt.gcf()
axes2 = mt2.plot()
fig2 = plt.gcf()
Is there a way to nest these two figures in a new matplotlib figure side to side?
import matplotlib.pyplot as plt
fig = plt.figure()
# ... Can I nest fig1 and fig2 side to side inside fig?
Thanks in advance for your help and comments.
