<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>
<spanid="sphx-glr-gallery-api-quad-bezier-py"></span><h1>Bezier Curve<aclass="headerlink" href="#bezier-curve" title="Permalink to this headline">¶</a></h1>
<p>This example showcases the PathPatch object to create a Bezier polycurve path
<spanclass="n">Path</span><spanclass="o">=</span><ahref="../../api/path_api.html#matplotlib.path.Path" title="View documentation for matplotlib.path.Path"><spanclass="n">mpath</span><spanclass="o">.</span><spanclass="n">Path</span></a>
<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">pp1</span><spanclass="o">=</span><ahref="../../api/_as_gen/matplotlib.patches.PathPatch.html#matplotlib.patches.PathPatch" title="View documentation for matplotlib.patches.PathPatch"><spanclass="n">mpatches</span><spanclass="o">.</span><spanclass="n">PathPatch</span></a><spanclass="p">(</span>
<spanclass="n">ax</span><spanclass="o">.</span><spanclass="n">set_title</span><spanclass="p">(</span><spanclass="s1">'The red point should be on the path'</span><spanclass="p">)</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>