Index: /issm/trunk-jpl/src/m/plot/plot_mesh.js
===================================================================
--- /issm/trunk-jpl/src/m/plot/plot_mesh.js	(revision 19777)
+++ /issm/trunk-jpl/src/m/plot/plot_mesh.js	(revision 19778)
@@ -47,81 +47,52 @@
 	var edgecolor=options.getfieldvalue('edgecolor','black');
 
-	/*//plot mesh
-	if (is2d){
-		A=elements(:,1); B=elements(:,2); C=elements(:,3); 
-		patch( 'Faces', [A B C], 'Vertices', [x y z],'FaceVertexCData',zeros(size(x)),'FaceColor','none','EdgeColor',edgecolor,'linewidth',linewidth);
+	// populate arrays 
+	//node plot {{{
+	if (elements[0].length==6){ //prisms
+		/*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',zeros(size(x)),'FaceColor','none','EdgeColor',edgecolor,'linewidth',linewidth);
+		  patch( 'Faces', [D E F],  'Vertices', [x y z],'FaceVertexCData',zeros(size(x)),'FaceColor','none','EdgeColor',edgecolor,'linewidth',linewidth);
+		  patch( 'Faces', [A B E D],'Vertices', [x y z],'FaceVertexCData',zeros(size(x)),'FaceColor','none','EdgeColor',edgecolor,'linewidth',linewidth);
+		  patch( 'Faces', [B E F C],'Vertices', [x y z],'FaceVertexCData',zeros(size(x)),'FaceColor','none','EdgeColor',edgecolor,'linewidth',linewidth);
+		  patch( 'Faces', [C A D F],'Vertices', [x y z],'FaceVertexCData',zeros(size(x)),'FaceColor','none','EdgeColor',edgecolor,'linewidth',linewidth);
+		  */
 	}
-	*/
-	
-	// populate arrays {{{
-	switch(datatype){
-		//element plot {{{
-		case 1:
-			break;
-		//}}}
-		//node plot {{{
-		case 2:
-			if (elements[0].length==6){ //prisms
-				/*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',zeros(size(x)),'FaceColor','none','EdgeColor',edgecolor,'linewidth',linewidth);
-				patch( 'Faces', [D E F],  'Vertices', [x y z],'FaceVertexCData',zeros(size(x)),'FaceColor','none','EdgeColor',edgecolor,'linewidth',linewidth);
-				patch( 'Faces', [A B E D],'Vertices', [x y z],'FaceVertexCData',zeros(size(x)),'FaceColor','none','EdgeColor',edgecolor,'linewidth',linewidth);
-				patch( 'Faces', [B E F C],'Vertices', [x y z],'FaceVertexCData',zeros(size(x)),'FaceColor','none','EdgeColor',edgecolor,'linewidth',linewidth);
-				patch( 'Faces', [C A D F],'Vertices', [x y z],'FaceVertexCData',zeros(size(x)),'FaceColor','none','EdgeColor',edgecolor,'linewidth',linewidth);
-				*/
-			}
-			else if (elements[0].length==4){ //tetras
-				/*A=elements(:,1); B=elements(:,2); C=elements(:,3); D=elements(:,4);
-				patch( 'Faces',[A B C],'Vertices', [x y z],'FaceVertexCData',zeros(size(x)),'FaceColor','none','EdgeColor',edgecolor,'linewidth',linewidth);
-				patch( 'Faces',[A B D],'Vertices', [x y z],'FaceVertexCData',zeros(size(x)),'FaceColor','none','EdgeColor',edgecolor,'linewidth',linewidth);
-				patch( 'Faces',[B C D],'Vertices', [x y z],'FaceVertexCData',zeros(size(x)),'FaceColor','none','EdgeColor',edgecolor,'linewidth',linewidth);
-				patch( 'Faces',[C A D],'Vertices', [x y z],'FaceVertexCData',zeros(size(x)),'FaceColor','none','EdgeColor',edgecolor,'linewidth',linewidth);
-				*/
-			}
-			else{ //2D triangular elements
-				vertices.itemSize = 3;
-				for(var i = 0; i < x.length; i++){
-					vertices[vertices.length] = x[i];
-					vertices[vertices.length] = y[i];
-					//vertices[vertices.length] = z[i];
-					vertices[vertices.length] = 0;
+	else if (elements[0].length==4){ //tetras
+		/*A=elements(:,1); B=elements(:,2); C=elements(:,3); D=elements(:,4);
+		  patch( 'Faces',[A B C],'Vertices', [x y z],'FaceVertexCData',zeros(size(x)),'FaceColor','none','EdgeColor',edgecolor,'linewidth',linewidth);
+		  patch( 'Faces',[A B D],'Vertices', [x y z],'FaceVertexCData',zeros(size(x)),'FaceColor','none','EdgeColor',edgecolor,'linewidth',linewidth);
+		  patch( 'Faces',[B C D],'Vertices', [x y z],'FaceVertexCData',zeros(size(x)),'FaceColor','none','EdgeColor',edgecolor,'linewidth',linewidth);
+		  patch( 'Faces',[C A D],'Vertices', [x y z],'FaceVertexCData',zeros(size(x)),'FaceColor','none','EdgeColor',edgecolor,'linewidth',linewidth);
+		  */
+	}
+	else{ //2D triangular elements
+		vertices.itemSize = 3;
+		for(var i = 0; i < x.length; i++){
+			vertices[vertices.length] = x[i];
+			vertices[vertices.length] = y[i];
+			//vertices[vertices.length] = z[i];
+			vertices[vertices.length] = 0;
 
-					//handle mesh/qinterest size mismatch
-					rgbcolor = [0.0, 0.0, 0.0];
-					colors[colors.length] = rgbcolor[0];
-					colors[colors.length] = rgbcolor[1];
-					colors[colors.length] = rgbcolor[2];
-					colors[colors.length] = 1.0;
-				}
+			//handle mesh/qinterest size mismatch
+			rgbcolor = [0.0, 0.0, 0.0];
+			colors[colors.length] = rgbcolor[0];
+			colors[colors.length] = rgbcolor[1];
+			colors[colors.length] = rgbcolor[2];
+			colors[colors.length] = 1.0;
+		}
 
-				//linearize the elements array: 
-				
-				for(var i = 0; i < elements.length; i++){
-					//convert tris to line edges; generates more edges than necessary, should optimize using node connectivity
-					//matlab indices from 1, so decrement indices.
-					indices[indices.length] = elements[i][0] - 1;
-					indices[indices.length] = elements[i][1] - 1;
-					indices[indices.length] = elements[i][1] - 1;
-					indices[indices.length] = elements[i][2] - 1;
-					indices[indices.length] = elements[i][2] - 1;
-					indices[indices.length] = elements[i][0] - 1;
-				}
-				indices.itemSize = 1;
-			}
-			break;
-		//}}}
-		//quiver plot {{{
-		case 3:
+		//linearize the elements array: 
 
-			if (is2d){
-				//plot_quiver(x,y,data(:,1),data(:,2),options);
-			}
-			else{
-				//plot_quiver3(x,y,z,data(:,1),data(:,2),data(:,3),options);
-			}
-
-		//}}}
-		default:
-			throw Error(sprintf("%s%i%s\n",'case ',datatype,' not supported'));
+		for(var i = 0; i < elements.length; i++){
+			//convert tris to line edges; generates more edges than necessary, should optimize using node connectivity
+			//matlab indices from 1, so decrement indices.
+			indices[indices.length] = elements[i][0] - 1;
+			indices[indices.length] = elements[i][1] - 1;
+			indices[indices.length] = elements[i][1] - 1;
+			indices[indices.length] = elements[i][2] - 1;
+			indices[indices.length] = elements[i][2] - 1;
+			indices[indices.length] = elements[i][0] - 1;
+		}
+		indices.itemSize = 1;
 	}
 	//}}}
