<divid="unreleased-message"> You are reading an old version of the documentation (v3.3.1). For the latest version see <ahref="https://matplotlib.org/stable/api/gridspec_api.html">https://matplotlib.org/stable/api/gridspec_api.html</a></div>
<spanid="matplotlib-gridspec"></span><h1><codeclass="docutils literal notranslate"><spanclass="pre">matplotlib.gridspec</span></code><aclass="headerlink" href="#module-matplotlib.gridspec" title="Permalink to this headline">¶</a></h1>
<p><aclass="reference internal" href="#module-matplotlib.gridspec" title="matplotlib.gridspec"><codeclass="xref py py-mod docutils literal notranslate"><spanclass="pre">gridspec</span></code></a> contains classes that help to layout multiple
<aclass="reference internal" href="axes_api.html#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Axes</span></code></a> in a grid-like pattern within a figure.</p>
<p>The <aclass="reference internal" href="_as_gen/matplotlib.gridspec.GridSpec.html#matplotlib.gridspec.GridSpec" title="matplotlib.gridspec.GridSpec"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">GridSpec</span></code></a> specifies the overall grid structure. Individual cells within
the grid are referenced by <aclass="reference internal" href="_as_gen/matplotlib.gridspec.SubplotSpec.html#matplotlib.gridspec.SubplotSpec" title="matplotlib.gridspec.SubplotSpec"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">SubplotSpec</span></code></a>s.</p>
<p>See the tutorial <aclass="reference internal" href="../tutorials/intermediate/gridspec.html#sphx-glr-tutorials-intermediate-gridspec-py"><spanclass="std std-ref">Customizing Figure Layouts Using GridSpec and Other Functions</span></a> for a
comprehensive usage guide.</p>
<divclass="section" id="classes">
<h2>Classes<aclass="headerlink" href="#classes" title="Permalink to this headline">¶</a></h2>
<td>Specifies the location of a subplot in a <aclass="reference internal" href="_as_gen/matplotlib.gridspec.GridSpec.html#matplotlib.gridspec.GridSpec" title="matplotlib.gridspec.GridSpec"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">GridSpec</span></code></a>.</td>