Im trying to visualize the difference between using two different variables as predictors of the body mass of penguins. I have two plots for the same x data, each one has the same scatterplot but with different approximation models line plots on top it. I can't find the way to display them both side by side. Seems to me that it should be a method similar to tight_layout() on regular seaborn, but I can't crack how to do it. Thanks in advance.
(
so.Plot(peng_sex_Train, x = "flipper_length_mm" )
.add(so.Dot(color ='g'), y = "body_mass_g", color = 'sex')
.add(so.Line(linewidth = 3), y = pred_peso_sex_train.flatten(), color = 'sex')
)
(
so.Plot(peng_sex_Train, x = "flipper_length_mm" )
.add(so.Dot(color ='g'), y = "body_mass_g", color = 'sex')
.add(so.Line(linewidth = 3), y = pred_peso_species_train.flatten(), color = 'species')
)
fig, (ax1, ax2) = plt.subpots(ncols=2)before creating the plots..on(ax1).plot()at the end of creating the plot onax1. Similar for.on(ax2).plot(). See Duplicate plots are output when using seaborn.objects with subplots in jupyter or integrating seaborn objects with matplotlib for examples.