Changeset 15111


Ignore:
Timestamp:
05/26/13 17:33:07 (12 years ago)
Author:
Mathieu Morlighem
Message:

CHG: better bounding box

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/plot/plot_googleearth.m

    r15110 r15111  
    1919xlim=getfieldvalue(options,'xlim',[min(x) max(x)]);
    2020ylim=getfieldvalue(options,'ylim',[min(y) max(y)]);
    21 post=getfieldvalue(options,'posting',diff(xlim)/1000);
    22 
    23 %Interpolating data on grid
    24 [x_m y_m data_grid]=InterpFromMeshToGrid(elements,x,y,data,xlim(1),ylim(2),post,post,round(diff(ylim)/post),round(diff(xlim)/post),NaN);
    25 if size(data_grid,1)<3 | size(data_grid,2)<3,
    26         error('data_grid size too small in plot_gridded, check posting and units');
    27 end
     21[latlist lonlist]= xy2ll(...
     22        [linspace(xlim(1),xlim(2),100) linspace(xlim(2),xlim(2),100) linspace(xlim(2),xlim(1),100) linspace(xlim(1),xlim(1),100)],...
     23        [linspace(ylim(1),ylim(1),100) linspace(ylim(1),ylim(2),100) linspace(ylim(2),ylim(2),100) linspace(ylim(2),ylim(1),100)],...
     24        +1,45,70);
    2825
    2926%limits in lat/long
    30 [ullat,ullon] = xy2ll(xlim(1),ylim(2),+1,45,70);
    31 [lrlat,lrlon] = xy2ll(xlim(2),ylim(1),+1,45,70);
     27ullat = max(latlist); ullon = min(lonlist);
     28lrlat = min(latlist); lrlon = max(lonlist);
    3229
    3330%Find optimal zoom
Note: See TracChangeset for help on using the changeset viewer.