Since it's really hard to copy content from one figure to another and it is in general not recommended, I would suggest you write your own version of the plotting function of the mcssa
package.
So instead of
m = MCSSA(...)
m.run_mcssa(...)
m.plot()
you can copy the following function to plot the result to an axes you specify
def ssaplot(mc_ssa, freq_rank=True, ax=None):
ax = ax or plt.gca()
ax.set_yscale('log')
ax.set_ylabel('Variance')
ax.set_title('M: {}; cov: {}'.format(mc_ssa.M, mc_ssa.algo))
if not freq_rank:
x = [i for i in range(mc_ssa.M)]
y = mc_ssa.values
ax.set_xlabel('Eigenvalue Rank')
ax.plot(y, marker='s', linewidth=0, color='r')
else:
x = mc_ssa.freqs[mc_ssa.freq_rank]
y = mc_ssa.values[mc_ssa.freq_rank]
ax.set_xlabel('Frequency (Cycle/t. unit)')
ax.plot(x, y, marker='s', linewidth=0, color='r')
if mc_ssa.ismc:
errors = np.array(mc_ssa.stats.iloc[3:5, :])
mean_suro = np.array(mc_ssa.stats.iloc[0, :])
ax.errorbar(x, y=mean_suro, yerr=errors, fmt=None,
ecolor='k', elinewidth=.5, capsize=2.5)
ax.set_title('M: {}; g: {}; a: {}; Ns: {}'.format(mc_ssa.M,
mc_ssa.ar.gamma,
mc_ssa.ar.alpha,
mc_ssa.n_suro))
use it like
import numpy as np
import matplotlib.pyplot as plt
from mcssa import MCSSA # probably(?)
m1 = MCSSA(...)
m1.run_mcssa(...)
m2 = MCSSA(...)
m2.run_mcssa(...)
fig, (ax1, ax2) = plt.subplots(2)
ssaplot(m1, ax=ax1)
ssaplot(m2, ax=ax2)
plt.show()