<divid="unreleased-message"> You are reading an old version of the documentation (v1.5.3). For the latest version see <ahref="/stable/">https://matplotlib.org/stable/</a></div>
<spanid="api-colorbar-only"></span><h1>api example code: colorbar_only.py<aclass="headerlink" href="#api-example-code-colorbar-only-py" title="Permalink to this headline">¶</a></h1>
<spanclass="n">cb2</span><spanclass="o">.</span><spanclass="n">set_label</span><spanclass="p">(</span><spanclass="s1">'Discrete intervals, some other units'</span><spanclass="p">)</span>
<spanclass="c1"># The third example illustrates the use of custom length colorbar</span>
<spanclass="c1"># extensions, used on a colorbar with discrete intervals.</span>
<spanclass="n">cb3</span><spanclass="o">.</span><spanclass="n">set_label</span><spanclass="p">(</span><spanclass="s1">'Custom extension lengths, some other units'</span><spanclass="p">)</span>