Index: /issm/trunk-jpl/src/m/plot/plot_contour.m
===================================================================
--- /issm/trunk-jpl/src/m/plot/plot_contour.m	(revision 16318)
+++ /issm/trunk-jpl/src/m/plot/plot_contour.m	(revision 16319)
@@ -11,4 +11,5 @@
 options=removefield(options,'log',0);
 [data datatype]=processdata(md,datain,options);
+if isempty(data), error('data provided is empty'); end
 
 %check is2d
@@ -225,5 +226,9 @@
 			hold on      
 		else
-			h=[h;patch('Xdata',[xc;NaN],'Ydata',[yc;NaN],'facecolor','none','edgecolor',color,'linewidth',linewidth)];
+			dist = 5000;
+			if (max(xc)-min(xc)+max(yc)-min(yc))<dist, continue; end
+			h=patch('Xdata',[xc;NaN],'Ydata',[yc;NaN],'facecolor','none','edgecolor',map(i,:),'linewidth',linewidth);
+			c = horzcat([level, xc'; length(xc), yc']);
+			clabel(c,h,'FontSize',10,'labelspacing',20000,'color',map(i,:));
 			hold on
 		end
@@ -231,5 +236,5 @@
 		% Update the CS data structure as per "contours.m"
 		% so that clabel works
-		c = horzcat(c,[level, xc'; length(xc), yc']);
+		%c = horzcat(c,[level, xc'; length(xc), yc']);
 
 	end
@@ -241,5 +246,6 @@
 		clabel(c,h);
 	else
-		clabel(c,h,'color',color,'FontSize',14);
-	end
-end
+		%clabel(c,h,'color',color,'FontSize',10,'labelspacing',20000);
+		clabel(c,h,'FontSize',10,'labelspacing',20000);
+	end
+end
Index: /issm/trunk-jpl/src/m/plot/plot_overlay.m
===================================================================
--- /issm/trunk-jpl/src/m/plot/plot_overlay.m	(revision 16318)
+++ /issm/trunk-jpl/src/m/plot/plot_overlay.m	(revision 16319)
@@ -3,5 +3,5 @@
 %
 %   Usage:
-%      plot_overlay(md,options,plotlines,plotcols,i)
+%      plot_overlay(md,data,options,plotlines,plotcols,i)
 %
 %   See also: PLOTMODEL
