Making a distplot with a rug using seaborn is easy:
import seaborn as sns, numpy as np
%matplotlib inline
sns.set(rc={"figure.figsize": (8, 4)}); np.random.seed(0)
x = np.random.randn(100)
ax = sns.distplot(x, rug=True)
The rug plot above reflects the distribution x. But what if I want to display the rug from a different distribution, rug_array, under the dist plot of x?
rug_array = np.array([-2.0, -1, 0, 1, 2, 2.1, 3])
The answer should display a plot of the curve x with rug plot ticks at -2,-1, ,0, 1, 2, 2.1, and 3.
