Revision: 6848
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6848&view=rev
Author:   jdh2358
Date:     2009-01-29 17:18:50 +0000 (Thu, 29 Jan 2009)

Log Message:
-----------
added another image clippath demo; forgot there was already one in 
pylab_examples

Added Paths:
-----------
    trunk/matplotlib/examples/api/clippath_demo.py

Added: trunk/matplotlib/examples/api/clippath_demo.py
===================================================================
--- trunk/matplotlib/examples/api/clippath_demo.py                              
(rev 0)
+++ trunk/matplotlib/examples/api/clippath_demo.py      2009-01-29 17:18:50 UTC 
(rev 6848)
@@ -0,0 +1,20 @@
+"""
+Clipping to arbitrary patches and paths
+"""
+import numpy as np
+import matplotlib.pyplot as plt
+import matplotlib.path as path
+import matplotlib.patches as patches
+
+
+fig = plt.figure()
+ax = fig.add_subplot(111, frameon=False, xticks=[], yticks=[])
+
+im = ax.imshow(np.random.rand(10,10))
+
+patch = patches.Circle((300,300), radius=100)
+im.set_clip_path(patch)
+
+plt.show()
+
+


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to