You can use the matplotlib.patches API. For instance, to get the first line:
sns.distplot(x).get_lines()[0].get_data()
This returns two numpy arrays containing the x and y values for the line.
For the bars, information is stored in:
sns.distplot(x).patches
You can access the bar's height via the function patches.get_height()
:
[h.get_height() for h in sns.distplot(x).patches]
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…