<h3 dir="auto">Bug report</h3>
<h4 dir="auto">Bug summary</h4>
<p dir="auto">There is an inconsistency between the <a href="http://matplotlib.org/api/_as_gen/matplotlib.axes.Axes.bar.html#matplotlib.axes.Axes.bar" rel="nofollow">matplotlib's documentation</a> and actual outcome of the bar plot function. The documentation says that <code class="notranslate">left</code>  argument in the bar plot function indicate</p>
<blockquote>
<p dir="auto">the x coordinates of the left sides of the bars</p>
</blockquote>
<p dir="auto">In fact, the <code class="notranslate">left</code> parameter indicate the center of the bar.</p>
<h4 dir="auto">Code for reproduction</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt
import numpy as np
N = 3
width = 1.0
stat = [2.4, 3.2, 1.6]
ind = np.arange(1, 6, 2, dtype=np.float32)

fig, ax = plt.subplots()
ax.bar(ind, stat, width )
ax.set_xticks(ind+width/2.0)
plt.show()"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span>
<span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>
<span class="pl-v">N</span> <span class="pl-c1">=</span> <span class="pl-c1">3</span>
<span class="pl-s1">width</span> <span class="pl-c1">=</span> <span class="pl-c1">1.0</span>
<span class="pl-s1">stat</span> <span class="pl-c1">=</span> [<span class="pl-c1">2.4</span>, <span class="pl-c1">3.2</span>, <span class="pl-c1">1.6</span>]
<span class="pl-s1">ind</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">1</span>, <span class="pl-c1">6</span>, <span class="pl-c1">2</span>, <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">np</span>.<span class="pl-s1">float32</span>)

<span class="pl-s1">fig</span>, <span class="pl-s1">ax</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">subplots</span>()
<span class="pl-s1">ax</span>.<span class="pl-en">bar</span>(<span class="pl-s1">ind</span>, <span class="pl-s1">stat</span>, <span class="pl-s1">width</span> )
<span class="pl-s1">ax</span>.<span class="pl-en">set_xticks</span>(<span class="pl-s1">ind</span><span class="pl-c1">+</span><span class="pl-s1">width</span><span class="pl-c1">/</span><span class="pl-c1">2.0</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">show</span>()</pre></div>
<h4 dir="auto">Actual outcome and expected outcome</h4>
<p dir="auto">The x axis ticks should be in the center of bar if the documentation is right. In fact, the ticks are in the right side of each bar. See figure below<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/16662357/24069524/f7d904e2-0be4-11e7-816e-c94c8a2ae8bd.png"><img src="https://cloud.githubusercontent.com/assets/16662357/24069524/f7d904e2-0be4-11e7-816e-c94c8a2ae8bd.png" alt="image" style="max-width: 100%;"></a></p>
<h4 dir="auto">Matplotlib version</h4>
<ul dir="auto">
<li>Matplotlib version: 2.0.0</li>
<li>Python version: 2.7.13 and 3.5.2</li>
<li>Platform: Linux (CentOS 7)  and Windows</li>
<li>How did you install Matplotlib and Python: Anaconda</li>
</ul>
<h3 dir="auto">Bug report</h3>
<p dir="auto"><strong>Bug summary</strong></p>
<p dir="auto">Using <code class="notranslate">bar</code>, the first input argument is not used for the left edge of the bar, but rather the center, as if the kwarg <code class="notranslate">align='center'</code> was used. However, the desired behavior is obtained in both cases when using <code class="notranslate">align = 'center'</code> and <code class="notranslate">align = 'edge'</code>. Just when <code class="notranslate">align</code> is not specified, it should be 'edge' aligned which it is not.</p>
<p dir="auto"><strong>Code for reproduction</strong></p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt
plt.bar([1], [1])
plt.show()"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span>
<span class="pl-s1">plt</span>.<span class="pl-en">bar</span>([<span class="pl-c1">1</span>], [<span class="pl-c1">1</span>])
<span class="pl-s1">plt</span>.<span class="pl-en">show</span>()</pre></div>
<p dir="auto"><strong>Actual outcome</strong><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/4058407/22334729/17af86b4-e3dc-11e6-83d0-f5e3392625ac.png"><img src="https://cloud.githubusercontent.com/assets/4058407/22334729/17af86b4-e3dc-11e6-83d0-f5e3392625ac.png" alt="figure_1" style="max-width: 100%;"></a><br>
<strong>Expected outcome</strong><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/4058407/22334747/2ce9afc8-e3dc-11e6-8f69-0c0150522359.png"><img src="https://cloud.githubusercontent.com/assets/4058407/22334747/2ce9afc8-e3dc-11e6-8f69-0c0150522359.png" alt="figure_2" style="max-width: 100%;"></a></p>
<p dir="auto">In matplotlib 1.5.3 I got the expected behavior.</p>
<p dir="auto"><strong>Matplotlib version</strong><br>
matplotlib 2.0.0<br>
python 3.6.0<br>
both installed from the Arch Linux repository.</p>