Revision: 7966 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7966&view=rev Author: jswhit Date: 2009-11-14 15:58:16 +0000 (Sat, 14 Nov 2009)
Log Message: ----------- make sure data points are plotted on top of filled contours. Modified Paths: -------------- trunk/matplotlib/examples/pylab_examples/griddata_demo.py Modified: trunk/matplotlib/examples/pylab_examples/griddata_demo.py =================================================================== --- trunk/matplotlib/examples/pylab_examples/griddata_demo.py 2009-11-14 15:57:46 UTC (rev 7965) +++ trunk/matplotlib/examples/pylab_examples/griddata_demo.py 2009-11-14 15:58:16 UTC (rev 7966) @@ -11,15 +11,15 @@ z = x*np.exp(-x**2-y**2) # define grid. xi = np.linspace(-2.1,2.1,100) -yi = np.linspace(-2.1,2.1,100) +yi = np.linspace(-2.1,2.1,200) # grid the data. -zi = griddata(x,y,z,xi,yi) +zi = griddata(x,y,z,xi,yi,interp='linear') # contour the gridded data, plotting dots at the nonuniform data points. CS = plt.contour(xi,yi,zi,15,linewidths=0.5,colors='k') CS = plt.contourf(xi,yi,zi,15,cmap=plt.cm.jet) plt.colorbar() # draw colorbar # plot data points. -plt.scatter(x,y,marker='o',c='b',s=5) +plt.scatter(x,y,marker='o',c='b',s=5,zorder=10) plt.xlim(-2,2) plt.ylim(-2,2) plt.title('griddata test (%d points)' % npts) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Matplotlib-checkins mailing list Matplotlib-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins