text_plain_output_1.png image_output_1.png
import seaborn as sns

titanic = sns.load_dataset('titanic')

iris = sns.load_dataset('iris')

g = sns.PairGrid(iris, hue='species')
g = g.map_diag(sns.histplot)
g = g.map_offdiag(sns.scatterplot)
g = g.add_legend()