Jae-Joon Lee wrote:
> 
> 
> Please post a complete example that demonstrate your problem. My guess
> is that maybe you are not setting the transform of the clipping path
> correctly.
> Regards,
> 
> -JJ
> 
> 
> 

Here's a short example that does the opposite of what I'm looking for.   The
goal is to take a the polygon "poly_patch" and "cut" regions out of it.  
All I've managed to achieve so far has been to show regions of the
"poly_patch".    

I'm apparently missing a detail somewhere.  Thanks for the help!
---

import matplotlib
from matplotlib import patches
import pylab

fig=pylab.figure()
ax=fig.add_subplot(111)

# background line
line = ax.plot( [ 1, 2, 3], [ 1, 2, 3 ] )

# part I would like to see through
hole_patch = patches.Circle((2,2), radius=.5, facecolor='none')

# mask polygon that should cover/hide the area not intersecting the
"hole_patch"
poly_patch = patches.Polygon(((1,1),(1,3),(3,3), (3,1)))
ax.add_patch( hole_patch )
ax.add_patch( poly_patch )

# gets the opposite effect intended
poly_patch.set_clip_path( hole_patch )


pylab.show()
-- 
View this message in context: 
http://old.nabble.com/Remove%2C-mask%2C-or-hide-parts-of-a-polygon--tp27842142p27874544.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to