'Seaborn stacked displot with three variables

I am wondering if there is a way to visualise three variables using stacked displot. Two is relatively straightforward using x and hue arguments. For example:

tt=pd.read_csv("titanic-data.csv")
tt['Pclass'] = tt['Pclass'].astype(str)
sns.displot(x="Pclass", hue = "Embarked", multiple="stack",data=tt,height=5, aspect=1)
sns.set(font_scale=2)

Which results in following:

Now I would like to add whether a passenger has survived or not to this, for example by splitting the bars in two for every value in Pclass like in the following sketch, where bottom left rectangle for every category could be class 0 (not survived) and top right 1 (survived).

enter image description here

Can anyone advice how to implement this or any other sensible way of visualising three variables?

Many thanks.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source