Index: /issm/trunk-jpl/src/m/plot/plot_gridded.m
===================================================================
--- /issm/trunk-jpl/src/m/plot/plot_gridded.m	(revision 22700)
+++ /issm/trunk-jpl/src/m/plot/plot_gridded.m	(revision 22701)
@@ -51,9 +51,15 @@
 image_rgb = ind2rgb(uint16((data_grid - data_min)*(length(map)/(data_max-data_min))),map);
 if exist(options,'shaded'),
+
+	if exist(options,'dem'),
+		dem_grid=InterpFromMeshToGrid(elements,x,y,getfieldvalue(options,'dem'),x_m,y_m,NaN);
+	else
+		dem_grid=data_grid_save;
+	end
 	a    = -45;
 	scut = 0.2;
 	c    = 1;
 	% computes lighting from elevation gradient
-	[fx,fy] = gradient(data_grid_save,x_m,y_m);
+	[fx,fy] = gradient(dem_grid,x_m,y_m);
 	fxy = -fx*sind(a) - fy*cosd(a);
 	clear fx fy % free some memory...
