Changeset 22701


Ignore:
Timestamp:
04/19/18 19:57:49 (7 years ago)
Author:
Mathieu Morlighem
Message:

CHG: added dem field if dem is not the same as field

File:
1 edited

Legend:

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

    r21828 r22701  
    5151image_rgb = ind2rgb(uint16((data_grid - data_min)*(length(map)/(data_max-data_min))),map);
    5252if exist(options,'shaded'),
     53
     54        if exist(options,'dem'),
     55                dem_grid=InterpFromMeshToGrid(elements,x,y,getfieldvalue(options,'dem'),x_m,y_m,NaN);
     56        else
     57                dem_grid=data_grid_save;
     58        end
    5359        a    = -45;
    5460        scut = 0.2;
    5561        c    = 1;
    5662        % computes lighting from elevation gradient
    57         [fx,fy] = gradient(data_grid_save,x_m,y_m);
     63        [fx,fy] = gradient(dem_grid,x_m,y_m);
    5864        fxy = -fx*sind(a) - fy*cosd(a);
    5965        clear fx fy % free some memory...
Note: See TracChangeset for help on using the changeset viewer.