If you encounter the problem of bars disappearing when setting up the logarithmic scale using the previous solutions, try adding log=True to the call to the sea gateway function instead. (I don't have enough reputation to comment on other answers).
Using sns.factorplot :
import seaborn as sns import matplotlib.pyplot as plt sns.set(style="whitegrid") titanic = sns.load_dataset("titanic") g = sns.factorplot(x="class", y="survived", hue="sex", kind='bar', data=titanic, palette="muted", log=True) g.ax.set_ylim(0.05, 1)
Using sns.barplot :
import seaborn as sns import matplotlib.pyplot as plt sns.set(style="whitegrid") titanic = sns.load_dataset("titanic") g = sns.barplot(x="class", y="survived", hue="sex", data=titanic, palette="muted", log=True) g.set_ylim(0.05, 1)
rvf
source share