title: Plot a histogram with (X,Y) with X having some entries with multiple occurrences
body: <p>My goal is to plot a histogram or any other convenient graph actually with my data (X,Y) but the problem is that X is unsorted and most importantly has values with multiple occurrences. 
  Thus, I am pretty sure I have to rearrange my data first to get a convenient graph; more precisely, I would like to get (newX, newY) where newX is composed of unique values and contains all the values from X and where newY is computed as a mean of the values of Y having the same antecedents x in X... </p>
  
  <p>I hope the problem is clear and I thank you in advance for helping me solve this issue.</p>