I would like to create a ridgeplot in seaborn with both columns of the dataframe to see any pattern as well as distribution among them. .
I tried the following but both the plots are coming as a single overlapped plot:
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
df = pd.DataFrame({'A': (10, 20, 20,30, 30, 30, 35, 35, 34, 33, 32, 31, 30), 'B': (15, 20, 20,30, 30, 30, 35, 35, 34, 33, 32, 31, 30)})
g = sns.FacetGrid(df)
g.map(sns.kdeplot, 'A', clip_on = False)
g.map(sns.kdeplot, 'B', clip_on = False)
Is there any other way to show them within a single plot but not overlapped, like the following???
g = sns.FacetGrid(df)
g.map(sns.kdeplot, ['A', 'B'], clip_on = False)
Thank you very much.