title: Plot bar in matlab with log-scale x axis and same width
body: <p>I want to plot a bar chart in Matlab with (1) log-scale for x-axis and (2)bars in same width. But with the code below, the width of the bars are different. Can any one help? Many thanks！</p>
  
  <pre><code>    xdata = [0.01 0.018 0.032 0.056 0.1 0.18 0.32 0.56 1 1.8 3.2 5.6 10];
      ydata = [1.3 1.6 1.5 1.2 1.0 3.5 0.6 3.1 1.6 1.9 1.7 0.3 0.4];
      bar(xdata,ydata);
      set(gca,'XScale','log');
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/h3xFW.png" alt="enter image description here"></p>