title: matlab bar groups centered at specified location on the x-axis
body: <p>Suppose one would like to plot 2 sets of data with unequal number of elements</p>
  
  <pre><code>X=[1.1 1.4 1.2 1.1];
  Y=[1.4 1.4 1.1]; 
  </code></pre>
  
  <p>I can use boxplot</p>
  
  <pre><code>boxplot([X Y],[1 1 1 1 2 2 2]) 
  </code></pre>
  
  <p>to plot these, however
  there is no function like this for bar. i.e. I would like to plot
  the bars for each value of X and each value of Y but the values
  in X should cluster together and should be away from the bars in Y.
  Ideally In addition to the group, one would also like to specify a third parameter
  which would specify where on the x-axis should the bars be centred (say in my case [2 11]-- one value for each group).</p>
  
  <p>Does anyone have such a function?
  I've checked matlabcentral and haven't found what I'm looking for.
  thanks
  L</p>