We're updating the default styles for Matplotlib 2.0

Learn what to expect in the new updates


Previous topic

api example code: power_norm_demo.py

Next topic

api example code: radar_chart.py

This Page

api example code: quad_bezier.pyΒΆ

(Source code, png, hires.png, pdf)

import matplotlib.path as mpath
import matplotlib.patches as mpatches
import matplotlib.pyplot as plt

Path = mpath.Path

fig, ax = plt.subplots()
pp1 = mpatches.PathPatch(
    Path([(0, 0), (1, 0), (1, 1), (0, 0)],
         [Path.MOVETO, Path.CURVE3, Path.CURVE3, Path.CLOSEPOLY]),
    fc="none", transform=ax.transData)

ax.plot([0.75], [0.25], "ro")
ax.set_title('The red point should be on the path')


Keywords: python, matplotlib, pylab, example, codex (see Search examples)