Index: /issm/trunk-jpl/src/m/plot/plot_manager.js
===================================================================
--- /issm/trunk-jpl/src/m/plot/plot_manager.js	(revision 19928)
+++ /issm/trunk-jpl/src/m/plot/plot_manager.js	(revision 19929)
@@ -7,12 +7,10 @@
 //   See also: PLOTMODEL, PLOT_UNIT
 			
-
 	//parse options and get a structure of options. 
 	checkplotoptions(md,options);
-
 	//get data to be displayed
 	data=options.getfieldvalue('data');
-
-	//standard plot: initialize open Gl for each canvas: 
+	
+	//standard plot: initialize open Gl for each canvas, if needed: 
 	var canvas = $('<div><canvas id="'+options.getfieldvalue('canvasid')+'" width="'+options.getfieldvalue('canvassize',480)+'" height="'+options.getfieldvalue('canvassize',480)+'"></canvas></div>)')
 	canvas.css({'height':String(options.getfieldvalue('canvassize',480)+'px')});
@@ -21,15 +19,20 @@
 	}
 	canvas=document.getElementById(options.getfieldvalue('canvasid'));
-
-	// Initialize the GL context: 
-	var gl=initWebGL(canvas,options);
-	if(!gl){
-		throw Error("plotmodel error message: could not initialize open Gl!");
-	}
-	
-	//Initialize the buffer structure: 
-	var nodes = {};
-	nodes["main"] = Node(gl,options);
-	
+	//Initialize the buffer structure when first data is drawn to mesh:
+	var requestDrawing = false;
+	var gl = canvas.gl;
+	if (!canvas.hasOwnProperty("nodes")) {
+		canvas.nodes = {};
+		canvas.datalength = 0;
+		requestDrawing = true;
+		//Initialize the GL context: 
+		gl = initWebGL(canvas,options);
+		if (!gl) {
+			throw Error("plotmodel error message: could not initialize open Gl!");
+		}
+		canvas.gl = gl;
+	}
+	canvas.nodes["data"+String(++canvas.datalength)] = Node(gl,options);
+
 	//figure out if this is a special plot
 	if (typeof data === 'string'){
@@ -189,6 +192,6 @@
 	//Figure out if this is a semi-transparent plot.
 	if (options.getfieldvalue('overlay','off')=='on'){
-		nodes["overlay"] = Node(gl,options);
-		plot_overlay(md,data,options,canvas,gl,nodes["overlay"]);
+		canvas.nodes["overlay"] = Node(gl,options);
+		plot_overlay(md,data,options,canvas,gl,canvas.nodes["overlay"]);
 	}
 
@@ -219,11 +222,11 @@
 	if (typeof data !== 'string'){
 		//plot unit
-		plot_unit(md,data,options,canvas,gl,nodes["main"]);
-	}
-
-	//applyoptions(md,data2,options); 
-	applyoptions(md,data,options,canvas,gl,nodes["main"]);
+		plot_unit(md,data,options,canvas,gl,canvas.nodes["data"+String(canvas.datalength)]);
+	}
+
+	applyoptions(md,data,options,canvas,gl,canvas.nodes["data"+String(canvas.datalength)]);
 	
-	/*Draw into the canvas:*/
-	draw(gl,options,canvas,nodes);
+	//Draw into the canvas if needed:
+	if (requestDrawing)	draw(gl,options,canvas,canvas.nodes);
+	console.log(canvas.nodes);
 }
Index: /issm/trunk-jpl/src/m/plot/plot_overlay.js
===================================================================
--- /issm/trunk-jpl/src/m/plot/plot_overlay.js	(revision 19928)
+++ /issm/trunk-jpl/src/m/plot/plot_overlay.js	(revision 19929)
@@ -52,5 +52,5 @@
 	node["modelMatrix"] = recalculateModelMatrix(node);
 	node["texture"] = initTexture(gl,options.getfieldvalue('image'));
-	node["alpha"] = options.getfieldvalue('alpha',.5);
+	node["alpha"] = options.getfieldvalue('outeralpha',.9);
 	node["overlay"] = false;
 	node["drawOrder"] = 1;
Index: /issm/trunk-jpl/src/m/plot/plot_unit.js
===================================================================
--- /issm/trunk-jpl/src/m/plot/plot_unit.js	(revision 19928)
+++ /issm/trunk-jpl/src/m/plot/plot_unit.js	(revision 19929)
@@ -58,5 +58,5 @@
 	node["translation"] = [(xmin + xmax) / (-2 / scale), (ymin + ymax) / (-2 / scale), (zmax) / (-1 / scale)];
 	node["modelMatrix"] = recalculateModelMatrix(node);
-	node["alpha"] = options.getfieldvalue('alpha',1.0);
+	node["alpha"] = options.getfieldvalue('alpha',.6);
 	node["overlay"] = options.getfieldvalue('overlay','off') == 'on';
 	node["drawOrder"] = 0;
Index: /issm/trunk-jpl/src/m/plot/plotmodel.js
===================================================================
--- /issm/trunk-jpl/src/m/plot/plotmodel.js	(revision 19928)
+++ /issm/trunk-jpl/src/m/plot/plotmodel.js	(revision 19929)
@@ -34,8 +34,13 @@
 	//go through subplots
 	if (numberofplots){
-
+		//Clear all canvas nodes
+		for (var i=0;i<numberofplots;i++){
+			var canvas=document.getElementById(options.list[i].getfieldvalue('canvasid'));
+			if (canvas && canvas.nodes) {
+				delete canvas.nodes;
+			}
+		}
 		//Go through all data plottable and close window if an error occurs
 		for (var i=0;i<numberofplots;i++){
-
 			plot_manager(options.list[i].getfieldvalue('model',md),options.list[i],subplotwidth,nlines,ncols,i);
 
Index: /issm/trunk-jpl/src/m/plot/webgl.js
===================================================================
--- /issm/trunk-jpl/src/m/plot/webgl.js	(revision 19928)
+++ /issm/trunk-jpl/src/m/plot/webgl.js	(revision 19929)
@@ -423,10 +423,11 @@
 		gl.uniform1i(node["shader"]["uColorSampler"], 0);	
 	}
-	if (node["overlay"] == true) {
-		gl.blendFunc(gl.SRC_ALPHA, gl.ONE);
-	}
-	else {
-		gl.blendFunc (gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
-	}
+	//if (node["overlay"] == true) {
+	//	gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
+	//}
+	//else {
+	//	gl.blendFunc (gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
+	//}
+	gl.blendFunc (gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
 	if  (node["useIndexBuffer"] == true) {
 		gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, node["buffers"][node["buffers"].length - 1]);
