Index: /issm/trunk/src/m/model/plot/plotmodel.m
===================================================================
--- /issm/trunk/src/m/model/plot/plotmodel.m	(revision 6496)
+++ /issm/trunk/src/m/model/plot/plotmodel.m	(revision 6497)
@@ -49,10 +49,12 @@
 	set(gcf,'Renderer','zbuffer');
 
-	%Go through all data plottable
-	for i=1:numberofplots,
-
-		%call unit plot
-		plot_manager(md,options.list{i},subplotwidth,nlines,ncols,i);
-
+	%Go through all data plottable and close window if an error occurs
+	try,
+		for i=1:numberofplots,
+			plot_manager(md,options.list{i},subplotwidth,nlines,ncols,i);
+		end
+	catch me,
+		figure(figurenumber),close;
+		rethrow(me);
 	end
 else
Index: /issm/trunk/src/m/model/plot/processdata.m
===================================================================
--- /issm/trunk/src/m/model/plot/processdata.m	(revision 6496)
+++ /issm/trunk/src/m/model/plot/processdata.m	(revision 6497)
@@ -125,4 +125,8 @@
 	%log?
 	if exist(options,'log'),
+		bounds=getfieldvalue(options,'caxis',[min(data(:)) max(data(:))]);
+		if any(data<=0) & min(bounds)<0,
+			error('Log option cannot be applied on negative values. Use caxis option (Rignot''s settings: [1.5 max(data)])');
+		end
 		pos=find(~isnan(data));
 		data(pos)=log(data(pos))/log(getfieldvalue(options,'log'));
@@ -150,4 +154,8 @@
 	%log?
 	if exist(options,'log'),
+		bounds=getfieldvalue(options,'caxis',[min(data(:)) max(data(:))]);
+		if any(data<=0) & min(bounds)<=0,
+			error('Log option cannot be applied on negative values. Use caxis option (Rignot''s settings: [1.5 max(data)])');
+		end
 		data=log(data)/log(getfieldvalue(options,'log'));
 	end
