Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. import numpy as np
  2. import matplotlib as plot
  3. import seaborn as sns
  4.  
  5. x1 = np.array([0.0, 0.0, 0.0, 0.0, 0.5, -0.12500000000000003, 0.0, -0.4, 0.0, 0.25])
  6.  
  7. ## Simple histogram, weighted to reveal probabilities
  8. plt.hist(x1, weights=np.ones(len(x1))/len(x1));
  9.  
  10. ## Histogram + kde, but clearly something has gone wrong
  11. sns.distplot(x1, hist=True, kde=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement