From: C M <cmp...@gm...> - 2012-03-22 05:44:13
|
For the following code, if I remove the transform=None a green patch is shown. If it is in, it is not shown. I would think that transform=None should have no effect. Why is this? Thanks, Che import matplotlib.pyplot as plt import matplotlib.patches as patches from matplotlib.path import Path fig = plt.figure() ax = fig.add_subplot(111) start = 0.2 stop = .6 verts = [ (start, .2), # left, bottom (start, .4), # left, top (stop, .4), # right, top (stop, .2), # right, bottom (0., 0.), # ignored ] codes = [Path.MOVETO, Path.LINETO, Path.LINETO, Path.LINETO, Path.CLOSEPOLY, ] path = Path(verts, codes) patch = patches.PathPatch(path, facecolor='g', lw=1, edgecolor='grey',transform=None ) ax.add_patch(patch) plt.show() |