<divid="unreleased-message"> You are reading an old version of the documentation (v2.2.0). For the latest version see <ahref="/stable/">https://matplotlib.org/stable/</a></div>
<spanclass="n">ind</span><spanclass="o">=</span><ahref="https://docs.scipy.org/doc/numpy/reference/generated/numpy.arange.html#numpy.arange" title="View documentation for numpy.arange"><spanclass="n">np</span><spanclass="o">.</span><spanclass="n">arange</span></a><spanclass="p">(</span><spanclass="nb">len</span><spanclass="p">(</span><spanclass="n">men_means</span><spanclass="p">))</span><spanclass="c1"># the x locations for the groups</span>
<spanclass="n">width</span><spanclass="o">=</span><spanclass="mf">0.35</span><spanclass="c1"># the width of the bars</span>
<spanclass="n">fig</span><spanclass="p">,</span><spanclass="n">ax</span><spanclass="o">=</span><ahref="../../api/_as_gen/matplotlib.pyplot.subplots.html#matplotlib.pyplot.subplots" title="View documentation for matplotlib.pyplot.subplots"><spanclass="n">plt</span><spanclass="o">.</span><spanclass="n">subplots</span></a><spanclass="p">()</span>
<spanclass="n">ax</span><spanclass="o">.</span><spanclass="n">set_title</span><spanclass="p">(</span><spanclass="s1">'Scores by group and gender'</span><spanclass="p">)</span>
<spanclass="sd"> Attach a text label above each bar in *rects*, displaying its height.</span>
<spanclass="sd"> *xpos* indicates which side to place the text w.r.t. the center of</span>
<spanclass="sd"> the bar. It can be one of the following {'center', 'right', 'left'}.</span>
<spanclass="sd"> """</span>
<spanclass="n">xpos</span><spanclass="o">=</span><spanclass="n">xpos</span><spanclass="o">.</span><spanclass="n">lower</span><spanclass="p">()</span><spanclass="c1"># normalize the case of the parameter</span>
<ahref="../../api/_as_gen/matplotlib.pyplot.show.html#matplotlib.pyplot.show" title="View documentation for matplotlib.pyplot.show"><spanclass="n">plt</span><spanclass="o">.</span><spanclass="n">show</span></a><spanclass="p">()</span>