Re: [Matplotlib-users] some numpy help for clipping rows/column of masked data

2008-09-12 Thread Pierre GM
Marjolaine, Getting rid of rows/columns in your case might be a bit tricky, as there's nothing to ensure that your domain is actually square. First, create your mask: lon_mask = (lon >= min_lon) & (lon <= max_lon) lat_mask = (lat >= min_lat) & (lat <= max_lat) glb_mask = lon_mask & lat_mask glb_

[Matplotlib-users] some numpy help for clipping rows/column of masked data

2008-09-12 Thread Marjolaine Rouault
Hi, I was wondering if the matplotlib users would be able to help with a numpy problem. I have 2 dimensional arrays of latitudes and longitude named lon and lat and only want to extract lats and lons within a certain domain It is easy to apply the mask lonMask = (lon >= minLon) & (lon <= maxLo