Index: /issm/trunk/src/m/model/plot/plot_section.m
===================================================================
--- /issm/trunk/src/m/model/plot/plot_section.m	(revision 7291)
+++ /issm/trunk/src/m/model/plot/plot_section.m	(revision 7292)
@@ -29,13 +29,14 @@
 options=removefield(options,'colormap',0); %back to default colormap
 
+%replug x and y onto model so that SectionValue treats the problem correctly
+md3d=md;
+if exist(options,'layer')
+	md.x=md.x2d; md.y=md.y2d; md.elements=md.elements2d; md.dim=2;
+end
+
 %Loop over number of curves
 for i=1:numcurves,
 
-	[datai datatype]=processdata(md,data(:,i),options);
-
-	%replug x and y onto model so that SectionValue treats the problem correctly
-	if exist(options,'layer')
-		md.x=md.x2d; md.y=md.y2d; md.elements=md.elements2d; md.dim=2;
-	end
+	[datai datatype]=processdata(md3d,data(:,i),options);
 
 	%resolution
