From: Oliver <oli...@gm...> - 2014-11-21 13:13:16
|
As Thomas Caswell said, check out the "tri..." functions. No need for interpolation. This question recently reappeared on Stackoverflow and was answered there as well: https://stackoverflow.com/questions/27004422/contour-imshow-plot-for-irregular-x-y-z-data 2014-11-21 9:15 GMT+01:00 Shahar Shani Kadmiel <ka...@po...>: > When using scipy.interpolate.griddada, you could use 'nearest' if your > data is sufficiently dense. This will 'map' your grid onto whatever > rectangular grid leaving grid points outside the convex hull of the > original grid empty. Well, not empty but nan. > If you do wish to interpolate your dada, you could mask the resulting > rectangular grid post interpolation. > > — > Sent from Mailbox <https://www.dropbox.com/mailbox> > > > On Fri, Nov 21, 2014 at 2:12 AM, Maria Liukis <li...@us...> wrote: > >> Hello, >> >> I have a problem plotting data which is defined on a grid other than >> rectangular mesh, and would greatly appreciate any advise. My data is >> defined for 0.1degree grid for the state of California, and I don’t want to >> interpolate my data outside of the defined grid when plotting it. I used >> pcolormesh() function for rectangular area maps, but it only accepts >> rectangular grid and I was wondering if there is a simple solution to my >> problem. >> >> The only solution I could find was to use scipy.interpolate,griddata() to >> “map” my grid to a bounding rectangular grid (bounding rectangle around CA >> state), but that would also interpolate my data to grid cells outside of CA >> state, which I don’t want to do. >> >> Many thanks for any hints! >> Masha >> -- >> li...@us... >> >> >> >> >> ------------------------------------------------------------------------------ >> >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >> with Interactivity, Sharing, Native Excel Exports, App Integration & more >> Get technology previously reserved for billion-dollar corporations, FREE >> >> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |