I created 2 different plot in this way:
def first():
fig, axes = plt.subplots(1, figsize=(10, 5))
...
...
return fig, axes
def second():
fig, axes = plt.subplots(1, figsize=(10, 5))
...
...
return fig, axes
What I would like to do is to 'collect' these 2 plots in a single one. I try these solutions:
1:
fig, ax = plt.subplots(2, figsize=(15, 20))
ax[0].plot = first()
ax[1].plot = second()
plt.show()
2:
fig, ax = plt.subplots(2, figsize=(15, 20))
ax[0].plot = first()
ax[1].plot = second()
for ax in ax:
ax.label_outer()
plt.show()
but anytime I got 3 different figures:
one figures with 2 axes but empty
and 2 figures with the right plot but not where I wanted to be
Can someone help and suggest what I get wrong in my code? thanks


