Index: /issm/trunk/src/m/model/plot/plotdoc.m
===================================================================
--- /issm/trunk/src/m/model/plot/plotdoc.m	(revision 7243)
+++ /issm/trunk/src/m/model/plot/plotdoc.m	(revision 7244)
@@ -118,6 +118,5 @@
 disp('       ''textweight'':  same as standard ''FontWeight'' matlab option applied to text, use a cell of strings if more than one');
 disp('       ''textcolor'':  same as standard ''color'' matlab option applied to text, use a cell of strings if more than one');
-disp('       ''iceshelf'': ''none'' if ice shelves are to not be plotted');
-disp('       ''icesheet'': ''none'' if ice sheets are to not be plotted');
+disp('       ''mask'': list of flags of size numberofgrids or numberofelements. Only ''true'' values are plotted ');
 disp('       ''partitionedges'': ''off'' by default. overlay plot of partition edges');
 disp('       ''log'': value of log');
Index: /issm/trunk/src/m/model/plot/processdata.m
===================================================================
--- /issm/trunk/src/m/model/plot/processdata.m	(revision 7243)
+++ /issm/trunk/src/m/model/plot/processdata.m	(revision 7244)
@@ -118,16 +118,18 @@
 	end
 
-	%ice sheet only?
-	if getfieldvalue(options,'iceshelf',1)==0,
-		data(find(md.elementoniceshelf),:)=NaN;
+	%Mask?
+	if exist(options,'mask'),
+		flags=getfieldvalue(options,'mask');
+		pos=find(~flags);
+		if length(flags)==md.numberofgrids,
+			[pos2 dummy]=find(ismember(md.elements,pos));
+			data(pos2,:)=NaN;
+		elseif length(flags)==md.numberofelements
+			data(pos,:)=NaN;
+		else
+			disp('plotmodel warning: mask length not supported yet (supported length are md.numberofgrids and md.numberofelements');
+		end
 	end
-	%ice shelf only?
-	if getfieldvalue(options,'icesheet',1)==0,
-		data(find(~md.elementoniceshelf),:)=NaN;
-	end
-	%no water?
-	if getfieldvalue(options,'water',1)==0,
-		data(find(md.elementonwater),:)=NaN;
-	end
+
 	%log?
 	if exist(options,'log'),
@@ -145,19 +147,18 @@
 if (datasize(1)==md.numberofgrids & datasize(2)==1),
 	datatype=2;
-	%ice sheet only?
-	if getfieldvalue(options,'iceshelf',1)==0,
-		pos=find(md.gridoniceshelf);
-		data(pos,:)=NaN;
+
+	%Mask?
+	if exist(options,'mask'),
+		flags=getfieldvalue(options,'mask');
+		pos=find(~flags);
+		if length(flags)==md.numberofgrids,
+			data(pos,:)=NaN;
+		elseif length(flags)==md.numberofelements
+			data(md.elements(pos,:),:)=NaN;
+		else
+			disp('plotmodel warning: mask length not supported yet (supported length are md.numberofgrids and md.numberofelements');
+		end
 	end
-	%ice shelf only?
-	if getfieldvalue(options,'icesheet',1)==0,
-		pos=find(md.gridonicesheet);
-		data(pos,:)=NaN;
-	end
-	%no water?
-	if getfieldvalue(options,'water',1)==0,
-		pos=find(md.gridonwater);
-		data(pos,:)=NaN;
-	end
+
 	%log?
 	if exist(options,'log'),
@@ -167,5 +168,4 @@
 		data=log(data)/log(getfieldvalue(options,'log'));
 	end
-
 end
 
