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

On Fri, Nov 21, 2014 at 2:12 AM, Maria Liukis <liu...@usc.edu> 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
> --
> liu...@usc.edu
> ------------------------------------------------------------------------------
> 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
> Matplotlib-users@lists.sourceforge.net
> 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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to