Index: /issm/trunk-jpl/src/m/plot/plot_overlay.js
===================================================================
--- /issm/trunk-jpl/src/m/plot/plot_overlay.js	(revision 19873)
+++ /issm/trunk-jpl/src/m/plot/plot_overlay.js	(revision 19874)
@@ -48,5 +48,5 @@
 	node["translation"] = [(xmin + xmax) / (-2 / scale), (ymin + ymax) / (-2 / scale), (zmin + zmax) / (-2 / scale)];
 	node["modelMatrix"] = recalculateModelMatrix(node);
-	node["texture"] = initTexture(gl,options.getfieldvalue('image','images/penguin.png'));
+	node["texture"] = initTexture(gl,options.getfieldvalue('image','images/checker.gif'));
 	//node["alpha"] = options.getfieldvalue('alpha',1.0);
 	node["overlay"] = false;
@@ -57,11 +57,11 @@
 	vertices.itemSize = 3;
 	
-	var xrange = xmax - xmin;
-	var yrange = ymax - ymin;
+	var xrange = modelxlim[1] - modelxlim[0];
+	var yrange = modelylim[1] - modelylim[0];
 
 	//redefine overlay as square plane
-	//x = [xmin, xmax, xmin, xmax];
-	//y = [ymin, ymin, ymax, ymax];
-	//z = [zmin, zmin, zmin, zmin];
+	//x = [modelxlim[0], modelxlim[1], modelxlim[0], modelxlim[1]];
+	//y = [modelylim[0], modelylim[0], modelylim[1], modelylim[1]];
+	//z = [modelzlim[0], modelzlim[0], modelzlim[0], modelzlim[0]];
 	//elements = [[1,2,3],[2,4,3]];
 	
@@ -72,6 +72,6 @@
 		vertices[vertices.length] = z[i];
 
-		texcoords[texcoords.length] = (x[i] - xmin) / xrange;
-		texcoords[texcoords.length] = (y[i] - ymin) / yrange;
+		texcoords[texcoords.length] = (x[i] - modelxlim[0]) / xrange;
+		texcoords[texcoords.length] = (y[i] - modelylim[0]) / yrange;
 	}
 	
@@ -82,4 +82,5 @@
 	
 	/*Initalize buffers: */
-	node["buffers"] = initBuffers(gl,[vertices, texcoords, indices]);
+	node["arrays"] = [vertices, texcoords, indices];
+	node["buffers"] = initBuffers(gl,node["arrays"]);
 }
Index: /issm/trunk-jpl/src/m/plot/plot_unit.js
===================================================================
--- /issm/trunk-jpl/src/m/plot/plot_unit.js	(revision 19873)
+++ /issm/trunk-jpl/src/m/plot/plot_unit.js	(revision 19874)
@@ -33,7 +33,10 @@
 
 	//Compute coordinates and data range:
-	var xlim = options.getfieldvalue('xlim',[ArrayMin(x),ArrayMax(x)]);
-	var ylim = options.getfieldvalue('ylim',[ArrayMin(y),ArrayMax(y)]);
-	var zlim = options.getfieldvalue('zlim',[ArrayMin(z),ArrayMax(z)]);
+	var modelxlim = [ArrayMin(x),ArrayMax(x)];
+	var modelylim = [ArrayMin(y),ArrayMax(y)];
+	var modelzlim = [ArrayMin(z),ArrayMax(z)];
+	var xlim = options.getfieldvalue('xlim',modelxlim);
+	var ylim = options.getfieldvalue('ylim',modelylim);
+	var zlim = options.getfieldvalue('zlim',modelzlim);
 	xmin = xlim[0];
 	xmax = xlim[1];
@@ -146,5 +149,5 @@
 	
 	/*Initalize buffers: */
-	node["buffers"] = initBuffers(gl,[vertices, texcoords, indices]);
-	node["overlay"] = false;
+	node["arrays"] = [vertices, texcoords, indices];
+	node["buffers"] = initBuffers(gl,node["arrays"]);
 }
