Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# Initialize the FacetGrid object
g = sns.FacetGrid(df2, row="gender", hue="gender", aspect=5, height=3)
# # Draw the densities in a few steps, "age", shade=True, alpha=1, lw=3.5, bw=.2), "age", color="w", lw=2, bw=.2), y=0, lw=2)
# # Define and use a simple function to label the plot in axes coordinates
def label(x, color, label):
ax = plt.gca()
ax.text(0, .2, label, color=color, ha="left", va="center", transform=ax.transAxes), "age")
# Set the subplots to overlap
# # Remove axes details that don't play well with overlap
g.despine(bottom=True, left=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment