<divid="unreleased-message"> You are reading an old version of the documentation (v2.0.0). For the latest version see <ahref="https://matplotlib.org/stable/api/spines_api.html">https://matplotlib.org/stable/api/spines_api.html</a></div>
<spanid="matplotlib-spines"></span><h2><aclass="reference internal" href="#module-matplotlib.spines" title="matplotlib.spines"><codeclass="xref py py-mod docutils literal"><spanclass="pre">matplotlib.spines</span></code></a><aclass="headerlink" href="#module-matplotlib.spines" title="Permalink to this headline">¶</a></h2>
<dlclass="class">
<dtid="matplotlib.spines.Spine">
<emclass="property">class </em><codeclass="descclassname">matplotlib.spines.</code><codeclass="descname">Spine</code><spanclass="sig-paren">(</span><em>axes</em>, <em>spine_type</em>, <em>path</em>, <em>**kwargs</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.spines.Spine" title="Permalink to this definition">¶</a></dt>
<p>an axis spine – the line noting the data area boundaries</p>
<p>Spines are the lines connecting the axis tick marks and noting the
boundaries of the data area. They can be placed at arbitrary
positions. See function:<aclass="reference internal" href="#matplotlib.spines.Spine.set_position" title="matplotlib.spines.Spine.set_position"><codeclass="xref py py-obj docutils literal"><spanclass="pre">set_position</span></code></a>
for more information.</p>
<p>The default position is <codeclass="docutils literal"><spanclass="pre">('outward',0)</span></code>.</p>
<p>Spines are subclasses of class:<aclass="reference internal" href="patches_api.html#matplotlib.patches.Patch" title="matplotlib.patches.Patch"><codeclass="xref py py-obj docutils literal"><spanclass="pre">Patch</span></code></a>, and
inherit much of their behavior.</p>
<p>Spines draw a line or a circle, depending if
function:<aclass="reference internal" href="#matplotlib.spines.Spine.set_patch_line" title="matplotlib.spines.Spine.set_patch_line"><codeclass="xref py py-obj docutils literal"><spanclass="pre">set_patch_line</span></code></a> or
function:<aclass="reference internal" href="#matplotlib.spines.Spine.set_patch_circle" title="matplotlib.spines.Spine.set_patch_circle"><codeclass="xref py py-obj docutils literal"><spanclass="pre">set_patch_circle</span></code></a> has been
called. Line-like is the default.</p>
<ulclass="simple">
<li><em>axes</em> : the Axes instance containing the spine</li>
<li><em>spine_type</em> : a string specifying the spine type</li>
<li><em>path</em> : the path instance used to draw the spine</li>
<emclass="property">classmethod </em><codeclass="descname">circular_spine</code><spanclass="sig-paren">(</span><em>axes</em>, <em>center</em>, <em>radius</em>, <em>**kwargs</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.spines.Spine.circular_spine" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">cla</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.spines.Spine.cla" title="Permalink to this definition">¶</a></dt>
<dd><p>Clear the current spine</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.spines.Spine.draw">
<codeclass="descname">draw</code><spanclass="sig-paren">(</span><em>artist</em>, <em>renderer</em>, <em>*args</em>, <em>**kwargs</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.spines.Spine.draw" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="matplotlib.spines.Spine.get_bounds">
<codeclass="descname">get_bounds</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.spines.Spine.get_bounds" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_patch_transform</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.spines.Spine.get_patch_transform" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="matplotlib.spines.Spine.get_path">
<codeclass="descname">get_path</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.spines.Spine.get_path" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="matplotlib.spines.Spine.get_position">
<codeclass="descname">get_position</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.spines.Spine.get_position" title="Permalink to this definition">¶</a></dt>
<dd><p>get the spine position</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.spines.Spine.get_smart_bounds">
<codeclass="descname">get_smart_bounds</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.spines.Spine.get_smart_bounds" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_spine_transform</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.spines.Spine.get_spine_transform" title="Permalink to this definition">¶</a></dt>
<dd><p>get the spine transform</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.spines.Spine.is_frame_like">
<codeclass="descname">is_frame_like</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.spines.Spine.is_frame_like" title="Permalink to this definition">¶</a></dt>
<dd><p>return True if directly on axes frame</p>
<p>This is useful for determining if a spine is the edge of an
old style MPL plot. If so, this function will return True.</p>
</dd></dl>
<dlclass="classmethod">
<dtid="matplotlib.spines.Spine.linear_spine">
<emclass="property">classmethod </em><codeclass="descname">linear_spine</code><spanclass="sig-paren">(</span><em>axes</em>, <em>spine_type</em>, <em>**kwargs</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.spines.Spine.linear_spine" title="Permalink to this definition">¶</a></dt>
<dd><p>(staticmethod) Returns a linear <aclass="reference internal" href="#matplotlib.spines.Spine" title="matplotlib.spines.Spine"><codeclass="xref py py-class docutils literal"><spanclass="pre">Spine</span></code></a>.</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.spines.Spine.register_axis">
<codeclass="descname">register_axis</code><spanclass="sig-paren">(</span><em>axis</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.spines.Spine.register_axis" title="Permalink to this definition">¶</a></dt>
<dd><p>register an axis</p>
<p>An axis should be registered with its corresponding spine from
the Axes instance. This allows the spine to clear any axis
properties when needed.</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.spines.Spine.set_bounds">
<codeclass="descname">set_bounds</code><spanclass="sig-paren">(</span><em>low</em>, <em>high</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.spines.Spine.set_bounds" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the bounds of the spine.</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.spines.Spine.set_color">
<codeclass="descname">set_color</code><spanclass="sig-paren">(</span><em>c</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.spines.Spine.set_color" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the edgecolor.</p>
<p>ACCEPTS: matplotlib color arg or sequence of rgba tuples</p>
<dd>For setting the edge or face color individually.</dd>
</dl>
</div>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.spines.Spine.set_patch_circle">
<codeclass="descname">set_patch_circle</code><spanclass="sig-paren">(</span><em>center</em>, <em>radius</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.spines.Spine.set_patch_circle" title="Permalink to this definition">¶</a></dt>
<dd><p>set the spine to be circular</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.spines.Spine.set_patch_line">
<codeclass="descname">set_patch_line</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.spines.Spine.set_patch_line" title="Permalink to this definition">¶</a></dt>
<dd><p>set the spine to be linear</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.spines.Spine.set_position">
<codeclass="descname">set_position</code><spanclass="sig-paren">(</span><em>position</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.spines.Spine.set_position" title="Permalink to this definition">¶</a></dt>
<dd><p>set the position of the spine</p>
<p>Spine position is specified by a 2 tuple of (position type,
amount). The position types are:</p>
<ulclass="simple">
<li>‘outward’ : place the spine out from the data area by the
specified number of points. (Negative values specify placing the
spine inward.)</li>
<li>‘axes’ : place the spine at the specified Axes coordinate (from
0.0-1.0).</li>
<li>‘data’ : place the spine at the specified data coordinate.</li>
</ul>
<p>Additionally, shorthand notations define a special positions:</p>
<codeclass="descname">set_smart_bounds</code><spanclass="sig-paren">(</span><em>value</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.spines.Spine.set_smart_bounds" title="Permalink to this definition">¶</a></dt>
<dd><p>set the spine and associated axis to have smart bounds</p>