Index: /issm/trunk-jpl/src/m/plot/processmesh.m
===================================================================
--- /issm/trunk-jpl/src/m/plot/processmesh.m	(revision 16487)
+++ /issm/trunk-jpl/src/m/plot/processmesh.m	(revision 16488)
@@ -21,53 +21,50 @@
 end
 
-if ~isempty(data)
-	%first load x,y, etc ... to speed up plot
+%first load x,y, etc ... to speed up plot
+if ~strcmpi(getfieldvalue(options,'coord','xy'),'latlon'),
+	x=md.mesh.x;
+	if isprop(md.mesh,'x2d'), x2d=md.mesh.x2d; end
+	y=md.mesh.y;
+	if isprop(md.mesh,'y2d'), y2d=md.mesh.y2d; end
+else
+	x=md.mesh.long;
+	y=md.mesh.lat;
+end
 
-	if ~strcmpi(getfieldvalue(options,'coord','xy'),'latlon'),
-		x=md.mesh.x;
-		if isprop(md.mesh,'x2d'), x2d=md.mesh.x2d; end
-		y=md.mesh.y;
-		if isprop(md.mesh,'y2d'), y2d=md.mesh.y2d; end
+z_field=getfieldvalue(options,'z',md.mesh.z);
+if ischar(z_field),
+	z=md.(z_field);
+elseif isnumeric(z_field),
+	z=z_field;
+else
+	z=md.mesh.z;
+end
+
+if isprop(md.mesh,'elements2d'), elements2d=md.mesh.elements2d; end
+elements=md.mesh.elements;
+
+%is it a 2d plot?
+if (md.mesh.dimension==2);
+	is2d=1;
+elseif (md.mesh.dimension==3),
+	if getfieldvalue(options,'layer',0)>=1,
+		is2d=1;
 	else
-		x=md.mesh.long;
-		y=md.mesh.lat;
+		is2d=0;
 	end
+else
+	error(['dim = ' num2str(md.mesh.dimension) ' not supported yet']);
+end
 
-	z_field=getfieldvalue(options,'z',md.mesh.z);
-	if ischar(z_field),
-		z=md.(z_field);
-	elseif isnumeric(z_field),
-		z=z_field;
-	else
-		z=md.mesh.z;
+%layer projection? 
+if getfieldvalue(options,'layer',0)>=1,
+	if strcmpi(getfieldvalue(options,'coord','xy'),'latlon'),
+		error('processmesh error message: cannot work with 3D meshes for now');
 	end
-
-	if isprop(md.mesh,'elements2d'), elements2d=md.mesh.elements2d; end
-	elements=md.mesh.elements;
-
-	%is it a 2d plot?
-	if (md.mesh.dimension==2);
-		is2d=1;
-	elseif (md.mesh.dimension==3),
-		if getfieldvalue(options,'layer',0)>=1,
-			is2d=1;
-		else
-			is2d=0;
-		end
-	else
-		error(['dim = ' num2str(md.mesh.dimension) ' not supported yet']);
-	end
-
-	%layer projection? 
-	if getfieldvalue(options,'layer',0)>=1,
-		if strcmpi(getfieldvalue(options,'coord','xy'),'latlon'),
-			error('processmesh error message: cannot work with 3D meshes for now');
-		end
-		%we modify the mesh temporarily to a 2d mesh from which the 3d mesh was extruded. 
-		x=x2d;
-		y=y2d;
-		z=zeros(size(x2d));
-		elements=elements2d;
-	end
+	%we modify the mesh temporarily to a 2d mesh from which the 3d mesh was extruded. 
+	x=x2d;
+	y=y2d;
+	z=zeros(size(x2d));
+	elements=elements2d;
 end
 
