I need to draw a polygon that has 4 sides with the right side being an arc. Similar to this:
I have tried to use the code provided by matplotlib for bezier curves but with no success. Any help would be appreciated : )
from matplotlib.path import Path
import matplotlib.patches as patches
verts = [
(0., 0.), # P0
(0, 1.), # P1
(1., 1), # P2
(1, 0.), # P3
]
codes = [
Path.MOVETO,
Path.CURVE4,
Path.CURVE4,
Path.CURVE4,
]
path = Path(verts, codes)
fig, ax = plt.subplots()
patch = patches.PathPatch(path, facecolor='none', lw=2)
ax.add_patch(patch)
xs, ys = zip(*verts)
ax.plot(xs, ys, lw=2, color='black', ms=10)
ax.set_xlim(-0.1, 1.1)
ax.set_ylim(-0.1, 1.1)
plt.show()

