Index: /issm/trunk-jpl/src/m/plot/plot_unit.js
===================================================================
--- /issm/trunk-jpl/src/m/plot/plot_unit.js	(revision 19887)
+++ /issm/trunk-jpl/src/m/plot/plot_unit.js	(revision 19888)
@@ -58,5 +58,5 @@
 	node["overlay"] = options.getfieldvalue('overlay','off') == 'on';
 	node["drawOrder"] = 0;
-		
+		console.log(data,datatype);
 	switch(datatype){
 
@@ -107,70 +107,19 @@
 				  patch( 'Faces',[C A D],'Vertices', [x y z],'FaceVertexCData',data(:),'FaceColor','interp','EdgeColor',edgecolor);*/
 			}
-			else{ //triangular elements
-			
+			else{ //triangular elements	
+				caxis = options.getfieldvalue('caxis',[ArrayMin(data),ArrayMax(data)]);
+				datamin = caxis[0];
+				datamax = caxis[1];
+				datadelta = datamax - datamin;
+
 				vertices.itemSize = 3;
-				var cmap=options.getfieldvalue('cmap','jet');
-				//If handling movie data, compute vertices once and texcoords for each movie frame
-				if (data[0] instanceof Float64Array) {
-					for(var i = 0; i < x.length; i++){
-						vertices[vertices.length] = x[i];
-						vertices[vertices.length] = y[i];
-						vertices[vertices.length] = z[i];
-					}	
-					//Transpose data to obtain column addressable data matrix
-					data = data[0].map(function(col, i) { 
-						return data.map(function(row) { 
-							return row[i]
-						})
-					});
-					for(var i = 0; i < data.length-1; i++){
-						//Prevent evaluation of datasubarray min/max if caxis exists
-						if (options.exist('caxis')) {
-							caxis = options.getfieldvalue('caxis');
-						}
-						else {
-							caxis = [ArrayMin(data[i]),ArrayMax(data[i])];
-						}
-						datamin = caxis[0];
-						datamax = caxis[1];
-						datadelta = datamax - datamin;
-						
-						//Precalculate arrays for each datasubarray
-						texcoords[i] = [];
-						texcoords[i].itemSize = 2;
-						for(var j = 0; j < x.length; j++){
-							texcoords[i][texcoords[i].length] = 0.5;
-							texcoords[i][texcoords[i].length] = (data[i][j] - datamin) / datadelta;
-						}
-					}
-					
-					//Initialize movie loop
-					node["movieInterval"] = 1000 / options.getfieldvalue('moviefps',5);
-					node["movieLength"] = data[0].length;
-					node["movieFrame"] = 0;
-					node["movieHandler"] = function () {
-							node["movieFrame"] = (node["movieFrame"] + 1) % (node["movieLength"]-1);
-							var array = [node["arrays"][0],node["arrays"][1][node["movieFrame"]],node["arrays"][2]];
-							node["buffers"] = initBuffers(gl,array);
-							if (true) {
-								setTimeout(node["movieHandler"], node["movieInterval"]);
-							}
-						};
-					setTimeout(node["movieHandler"], node["movieInterval"]);
-				}
-				else {
-					caxis = options.getfieldvalue('caxis',[ArrayMin(data),ArrayMax(data)]);
-					datamin = caxis[0];
-					datamax = caxis[1];
-					datadelta = datamax - datamin;
-					texcoords.itemSize = 2;
-					for(var i = 0; i < x.length; i++){
-						vertices[vertices.length] = x[i];
-						vertices[vertices.length] = y[i];
-						vertices[vertices.length] = z[i];
-
-						texcoords[texcoords.length] = 0.5;
-						texcoords[texcoords.length] = (data[i] - datamin) / datadelta;
-					}
+				texcoords.itemSize = 2;
+				for(var i = 0; i < x.length; i++){
+					vertices[vertices.length] = x[i];
+					vertices[vertices.length] = y[i];
+					vertices[vertices.length] = z[i];
+
+					texcoords[texcoords.length] = 0.5;
+					texcoords[texcoords.length] = (data[i] - datamin) / datadelta;
 				}
 
@@ -181,4 +130,7 @@
 
 			}
+			//Initalize buffers
+			node["arrays"] = [vertices, texcoords, indices];
+			node["buffers"] = initBuffers(gl,node["arrays"]);
 			break;
 		//}}}
@@ -192,18 +144,77 @@
 				//plot_quiver3(x,y,z,data(:,1),data(:,2),data(:,3),options);
 			}
-
-		//}}}
+			break;
+			
+		//}}}
+		//node transient plot {{{
+		case 5:
+			if (elements[0].length==6){ //prisms
+			}
+			else if (elements[0].length==4){//tetras
+			}
+			else{ //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];
+				}	
+				
+				//Transpose data to obtain column addressable data matrix
+				data = data[0].map(function(col, i) { 
+					return data.map(function(row) { 
+						return row[i]
+					})
+				});
+				
+				for(var i = 0; i < data.length-1; i++){
+					//Prevent evaluation of datasubarray min/max if caxis exists
+					if (options.exist('caxis')) {
+						caxis = options.getfieldvalue('caxis');
+					}
+					else {
+						caxis = [ArrayMin(data[i]),ArrayMax(data[i].slice(0,-1))];
+					}
+					datamin = caxis[0];
+					datamax = caxis[1];
+					datadelta = datamax - datamin;
+
+					//Precalculate arrays for each datasubarray
+					texcoords[i] = [];
+					texcoords[i].itemSize = 2;
+					for(var j = 0; j < x.length; j++){
+						texcoords[i][texcoords[i].length] = 0.5;
+						texcoords[i][texcoords[i].length] = (data[i][j] - datamin) / datadelta;
+					}
+				}
+				console.log(texcoords);
+				
+				//linearize the elements array: 
+				indices = indices.concat.apply(indices, elements); 
+				indices.itemSize = 1;
+				for(var i=0;i<indices.length;i++)indices[i]--; //matlab indices from 1, so decrement.
+				
+				//Initialize movie loop
+				node["movieInterval"] = 1000 / options.getfieldvalue('moviefps',5);
+				node["movieLength"] = data.length-1;
+				node["movieFrame"] = 0;
+				node["movieHandler"] = function () {
+						node["movieFrame"] = (node["movieFrame"] + 1) % (node["movieLength"]);
+						console.log(node["movieFrame"]);
+						var array = [node["arrays"][0],node["arrays"][1][node["movieFrame"]],node["arrays"][2]];
+						node["buffers"] = initBuffers(gl,array);
+						setTimeout(node["movieHandler"], node["movieInterval"]);
+					};
+				setTimeout(node["movieHandler"], node["movieInterval"]);
+			}
+			
+			//Initalize buffers
+			node["arrays"] = [vertices, texcoords, indices];
+			node["buffers"] = initBuffers(gl,[node["arrays"][0],node["arrays"][1][0],node["arrays"][2]]);
+			break;
+		//}}}
+			
 		default:
 			throw Error(sprintf("%s%i%s\n",'case ',datatype,' not supported'));
 	}
-	
-	/*Initalize buffers: */
-	if (data[0] instanceof Float64Array) {
-		node["arrays"] = [vertices, texcoords, indices];
-		node["buffers"] = initBuffers(gl,[node["arrays"][0],node["arrays"][1][0],node["arrays"][2]]);
-	}
-	else {
-		node["arrays"] = [vertices, texcoords, indices];
-		node["buffers"] = initBuffers(gl,node["arrays"]);
-	}
 }
Index: /issm/trunk-jpl/src/m/plot/processdata.js
===================================================================
--- /issm/trunk-jpl/src/m/plot/processdata.js	(revision 19887)
+++ /issm/trunk-jpl/src/m/plot/processdata.js	(revision 19888)
@@ -6,4 +6,5 @@
 	//   datatype = 3 -> node quivers
 	//   datatype = 4 -> patch
+	//   datatype = 5 -> nodes transient
 	//
 	//   Usage:
@@ -60,4 +61,5 @@
 		throw Error('plotmodel error message: data not supported yet');
 	}
+
 
 	//quiver?
@@ -194,4 +196,10 @@
 		}
 	}
+	
+	//node transient data
+    if (datasize==md.mesh.numberofvertices+1){
+        datatype=5;
+    }
+	
 
 	//layer projection? 
