Bryan Fodness wrote:
>  
> I have a pcolormest and a fill that are plotted on the same graph (they 
> have the same scale).  Is there an easy way
> to only plot the values of pcolormesh that lie in the fill?
> 
> pcolormesh(oX, oY, test, shading='flat', cmap=cm.gray_r)
> fill([-x1,x2,x2,-x1], [-y1,-y1,y2,y2], 'b', alpha=0.2, edgecolor='r')

Do you mean something like this?

ii = (oX > -x1) & (oX < x2)
jj = (oY > -y1) & (oY > y2)

pcolormesh(oX[ii], oY[jj], test[jj,][:,ii])

This assumes your oX and oY are 1-D, so you are plotting rectangular 
mesh.  Correct?

Eric

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to