antonv wrote: > Ok. Then what do you think would be the best way to have a smooth graph like > the contourf but with the data shown by pcolor? The best of both worlds in > other words :) > > Thanks, > Anton
Anton, The other thing to bear in mind is that with contourf, you are specifying the data values at grid points, and the algorithm is essentially interpolating to calculate the boundaries of polygons for which the data are between two adjacent contour levels; with pcolor you are specifying the boundaries of a grid, and your data values determine the colors of those rectangles (or more generally, quadrilaterals). That is, with pcolor your data value, Zij, determines the color of the box with corners at Xij,Yij and Xi+1 j+1, Yi+1 j+1. Eric > > > > Jeff Whitaker wrote: >> antonv wrote: >>> When plotting the same ocean data with contourf or pcolor I noticed a >>> difference at the edge between ocean area and the land where there is no >>> data. Basically, contourf is trimming from the edge and when using >>> basemap >>> you can see the underlying fill color. Is this normal behaviour or am I >>> doing something wrong? >>> >>> I've attached 2 images to show exactly what is happening. >>> >>> Thanks, >>> Anton >>> >>> >>> http://www.nabble.com/file/p21397184/img_contourf.png img_contourf.png >>> http://www.nabble.com/file/p21397184/img_pcolor.png img_pcolor.png >>> >> Anton: Contourf and pcolor deal with missing values in masked arrays >> differently, so yes - I think this is normal behavior. >> >> -Jeff >> >> ------------------------------------------------------------------------------ >> Check out the new SourceForge.net Marketplace. >> It is the best place to buy or sell services for >> just about anything Open Source. >> http://p.sf.net/sfu/Xq1LFB >> _______________________________________________ >> Matplotlib-users mailing list >> Matplotlib-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> > ------------------------------------------------------------------------------ Check out the new SourceForge.net Marketplace. It is the best place to buy or sell services for just about anything Open Source. http://p.sf.net/sfu/Xq1LFB _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users