I know how to create matplotlib plots side by side, using plt.subplots() and the axes variable . But I cannot find how to do this when the plotting functions come from different python packages, let's say seaborn and scipy.stats.
Can anyone help?
import seaborn as sns
import matplotlib.pyplot as plt
import scipy.stats as stats
from scipy.stats import norm
train = [1,2,2,3,3,3,4,4,4,5,6]*2
#Distribution from seaborn
sns.distplot(train, fit=norm);
plt.ylabel('Frequency')
#QQ-plot plot from stats
plt.figure()
stats.probplot(train, plot=plt)
plt.show()
This is the output of the code (not side by side):
Cheers,
Ricardo