I'm trying to plot a two plots in a figure using subplot. The first picture is generated using ax1.plot(...) and the second one using seaborn specifying the axis where I want to plot the figure. This is an example.
kind = "boxen"
fig, (ax1,ax2) = plt.subplots(1, 2, figsize=(15, 5), gridspec_kw={'width_ratios': [2, 1]})
X = np.arange(0,7,0.1)
ax1.plot(X,np.sin(X))
sns.catplot( x= "Dataset", y = "RSE", hue="Model",
data=df, kind=kind, ci="sd", ax = ax2)
And that is what appears when I run the code:
My questions are, how I can solve this? Why is generating a new figure?