<divid="unreleased-message"> You are reading an old version of the documentation (v3.4.0). For the latest version see <ahref="https://matplotlib.org/stable/gallery/misc/agg_buffer.html">https://matplotlib.org/stable/gallery/misc/agg_buffer.html</a></div>
<pclass="last">Click <aclass="reference internal" href="#sphx-glr-download-gallery-misc-agg-buffer-py"><spanclass="std std-ref">here</span></a> to download the full example code</p>
<spanid="sphx-glr-gallery-misc-agg-buffer-py"></span><h1>Agg Buffer<aclass="headerlink" href="#agg-buffer" title="Permalink to this headline">¶</a></h1>
<p>Use backend agg to access the figure canvas as an RGBA buffer, convert it to an