Is it possible to "copy/paste" figures into a subplot?
Let's say that you have created two figures
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
import pandas as pd
d = pd.DataFrame({'Time': np.linspace(0,10)})
d["Exp"] =np.exp(d["Time"])
d["Sin"] =np.sin(d["Time"])
f1,a1 = plt.subplots(1, 1)
sns.scatterplot(data=d,x='Time',y='Sin',ax=a1)
f2,a2 = plt.subplots(1, 1)
sns.scatterplot(data=d,x='Time',y='Exp',ax=a2)
Further down in program I then want to include these plots in a new figure with subplots. Reploting is not desired as the figure/axes in my project is outputs from a function.
I am not sure how to to do this, so I tried :
f3,a3=plt.subplots(2, 1)
a3[0]=a1
a3[3]=a2
f3
But that did not produce the desired result