Index: /issm/trunk/src/m/model/plot/applyoptions.m
===================================================================
--- /issm/trunk/src/m/model/plot/applyoptions.m	(revision 6975)
+++ /issm/trunk/src/m/model/plot/applyoptions.m	(revision 6976)
@@ -1,3 +1,3 @@
-function applyoptions(md,data,options)
+function applyoptions(md,data,options,plothandle)
 %APPLYOPTIONS - apply the options to current plot
 %
@@ -138,4 +138,15 @@
 		c(:,2) = max(min( (0.1+c(:,1)).^(1/alpha) ,1),0);
 		c = hsv2rgb(c);
+
+	elseif strcmpi(cname,'Rignot2'),
+		c = hsv;
+
+		%adjust saturation
+		c = rgb2hsv(c);
+		alpha=getfieldvalue(options,'alpha',1);
+		c(:,2) = max(min( (0.1+c(:,1)).^(1/alpha) ,1),0);
+		c = hsv2rgb(c);
+
+		c=flipud(c);
 
 	else
@@ -373,2 +384,8 @@
 %figurebackgrounbcolor
 set(gcf,'color',getfieldvalue(options,'figurebackgroundcolor','w'));
+
+%lighting
+if strcmpi(getfieldvalue(options,'light','off'),'on'),
+	set(plothandle,'FaceLighting','gouraud','FaceColor','interp','AmbientStrength',0.5);
+	light('Position',[0 0.1 0.1],'Style','infinite');
+end
Index: /issm/trunk/src/m/model/plot/plot_manager.m
===================================================================
--- /issm/trunk/src/m/model/plot/plot_manager.m	(revision 6975)
+++ /issm/trunk/src/m/model/plot/plot_manager.m	(revision 6976)
@@ -166,5 +166,5 @@
 
 %plot unit
-plot_unit(x,y,z,elements,data2,is2d,datatype,options);
+h=plot_unit(x,y,z,elements,data2,is2d,datatype,options);
 
 %apply all options
@@ -176,5 +176,5 @@
 end
 
-applyoptions(md,data2,options);
+applyoptions(md,data2,options,h);
 
 %plot inset if requested
@@ -199,5 +199,5 @@
 	patch('Faces',[1 2 3 4 1],'Vertices',[X1([1 2 2 1])' Y1([1 1 2 2])' -10^10*ones(4,1)],'FaceColor','w','EdgeColor','k');
 	hold on
-	plot_unit(x,y,z,elements,data2,is2d,datatype,options);
+	h=plot_unit(x,y,z,elements,data2,is2d,datatype,options);
 
 	%applay options
Index: /issm/trunk/src/m/model/plot/plot_unit.m
===================================================================
--- /issm/trunk/src/m/model/plot/plot_unit.m	(revision 6975)
+++ /issm/trunk/src/m/model/plot/plot_unit.m	(revision 6976)
@@ -1,7 +1,7 @@
-function plot_unit(x,y,z,elements,data,is2d,datatype,options)
+function h=plot_unit(x,y,z,elements,data,is2d,datatype,options)
 %PLOT_UNIT - unit plot, display data
 %
 %   Usage:
-%      plot_unit(x,y,z,elements,data,is2d,datatype,options);
+%      h=plot_unit(x,y,z,elements,data,is2d,datatype,options);
 %
 %   See also: PLOTMODEL, PLOT_MANAGER
@@ -22,8 +22,8 @@
 		if is2d,
 			A=elements(pos,1); B=elements(pos,2); C=elements(pos,3); 
-			patch( 'Faces', [A B C], 'Vertices', [x y z],'CData', data(pos),'FaceColor','flat','EdgeColor',edgecolor);
+			h=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData', data(pos),'FaceColor','flat','EdgeColor',edgecolor);
 		else
 			A=elements(pos,1); B=elements(pos,2); C=elements(pos,3); D=elements(pos,4); E=elements(pos,5); F=elements(pos,6);
-			patch( 'Faces', [A B C],  'Vertices', [x y z],'CData', data(pos),'FaceColor','flat','EdgeColor',edgecolor);
+			h=patch( 'Faces', [A B C],  'Vertices', [x y z],'CData', data(pos),'FaceColor','flat','EdgeColor',edgecolor);
 			patch( 'Faces', [D E F],  'Vertices', [x y z],'CData', data(pos),'FaceColor','flat','EdgeColor',edgecolor);
 			patch( 'Faces', [A B E D],'Vertices', [x y z],'CData', data(pos),'FaceColor','flat','EdgeColor',edgecolor);
@@ -37,8 +37,8 @@
 		if is2d,
 			A=elements(:,1); B=elements(:,2); C=elements(:,3); 
-			patch( 'Faces', [A B C], 'Vertices', [x y z],'FaceVertexCData', data(:),'FaceColor','interp','EdgeColor',edgecolor);
+			h=patch( 'Faces', [A B C], 'Vertices', [x y z],'FaceVertexCData', data(:),'FaceColor','interp','EdgeColor',edgecolor);
 		else
 			A=elements(:,1); B=elements(:,2); C=elements(:,3); D=elements(:,4); E=elements(:,5); F=elements(:,6);
-			patch( 'Faces', [A B C],  'Vertices', [x y z],'FaceVertexCData', data(:),'FaceColor','interp','EdgeColor',edgecolor);
+			h=patch( 'Faces', [A B C],  'Vertices', [x y z],'FaceVertexCData', data(:),'FaceColor','interp','EdgeColor',edgecolor);
 			patch( 'Faces', [D E F],  'Vertices', [x y z],'FaceVertexCData', data(:),'FaceColor','interp','EdgeColor',edgecolor);
 			patch( 'Faces', [A B E D],'Vertices', [x y z],'FaceVertexCData', data(:),'FaceColor','interp','EdgeColor',edgecolor);
@@ -60,8 +60,8 @@
 
 		if is2d,
-			patch( 'Faces',elements,'Vertices',[x y],'CData',data,'FaceColor','interp','EdgeColor',edgecolor);
+			h=patch( 'Faces',elements,'Vertices',[x y],'CData',data,'FaceColor','interp','EdgeColor',edgecolor);
 		else
 			A=elements(:,1); B=elements(:,2); C=elements(:,3); D=elements(:,4); E=elements(:,5); F=elements(:,6);
-			patch( 'Faces', [A B C], 'Vertices', [x y z],'CData', data,'FaceColor','interp','EdgeColor',edgecolor);
+			h=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData', data,'FaceColor','interp','EdgeColor',edgecolor);
 			patch( 'Faces', [D E F], 'Vertices', [x y z],'CData', data,'FaceColor','interp','EdgeColor',edgecolor);
 			patch( 'Faces', [A B E D], 'Vertices', [x y z],'CData', data,'FaceColor','interp','EdgeColor',edgecolor);
