I'm interested in clipping the result of plt.contour (and
plt.contourf) to a patch.  However, QuadContourSet does not have a
set_clip_path() method.  Is there a way to do this?

Here is an example plot that I have generated.

   http://imgur.com/pybIf

For the curious, it plots contours of a function on the 2-simplex.
The way I've gone about computing this is, unfortunately, convoluted.
I generate a regular grid in 2D and treat each point as a projection
of a 3D probability vector into 2D.  Then, I invert the projection so
that I have "distributions" and then compute the Z value for each
point.  The contours are then calculated, but now, I need to clip
everything outside the triangle, as only points within the triangle
correspond to actual distributions.

Is there a more direct way to calculate contours on a restricted set?

Thanks.

------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to