Index: /issm/trunk-jpl/src/m/plot/processdata.m
===================================================================
--- /issm/trunk-jpl/src/m/plot/processdata.m	(revision 25585)
+++ /issm/trunk-jpl/src/m/plot/processdata.m	(revision 25586)
@@ -81,15 +81,28 @@
 end
 
-%quiver?
-if datasize(2)>1,
-	datatype=3;
-
-	%check number of columns, add zeros if necessary,
-	if (dimension(md.mesh)==3)
-		if datasize(2)==2,
-			data=[data, zeros(datasize(1),1)];
-		elseif datasize(2)~=3,
-			error('plotmodel error message: data provided should have 2 or 3 columns for quiver plot, and 1 for regular plot');
-		end
+%quiver or patch?
+if datasize(2)>1
+	if datasize(2)==2 | datasize(2)==3
+		datatype=3;
+		%check number of columns, add zeros if necessary,
+		if (dimension(md.mesh)==3)
+			if datasize(2)==2,
+				data=[data, zeros(datasize(1),1)];
+			elseif datasize(2)~=3,
+				error('plotmodel error message: data provided should have 2 or 3 columns for quiver plot, and 1 for regular plot');
+			end
+		end
+	else
+		%must be a patch
+		disp('Assuming that data provided is a patch');
+		index = md.mesh.elements;
+		if size(data,2)<size(index,2)
+			error('Data size not supported yet');
+		end
+		datanew = zeros(numberofvertices,1);
+		datanew(md.mesh.elements) = data(:,1:size(index,2));
+		data = datanew;
+		datasize = [numberofvertices 1];
+		%---> go to node data
 	end
 end
