title: How to plot a graph with the same X but different Y value in MATLAB?
body: <p>If my data looks like below:</p>
  
  <pre><code>X = [ 1 2  2  3  4  5 5]
  Y = [10 9 -5 11 12 -3 7]
  </code></pre>
  
  <p>Can anyone please tell me how can I plot it as a bar char in Matlab? Because which I simply use bar(X, Y), it says that the XData can't not have duplicate values. The ideal situation is that in the same X position, there are two Y values. Thank you so much!!</p>