Index: /issm/trunk-jpl/src/m/exp/exptool.m
===================================================================
--- /issm/trunk-jpl/src/m/exp/exptool.m	(revision 19203)
+++ /issm/trunk-jpl/src/m/exp/exptool.m	(revision 19204)
@@ -16,4 +16,5 @@
 %      - markersize (default=7)
 %      - markeredgecolor (default='r')
+%      - nofigurecopy (default=0) do not copy current figure, this is needed on some plateform to avoid an offset in the figure
 %
 %   Usage:
@@ -98,24 +99,33 @@
 
 %get current figure
-if ~isempty(get(0,'children')),%if there is already a figure (return the number of opened figures)
-	set(gcf,'Renderer','zbuffer'); %fixes a bug on Mac OS X (not needed in future Matlab version)
-	P=get(gcf,'position');
-	F=getframe(gca);
-	F=F.cdata;
-	%get current axis
-	xlim=get(gca,'Xlim');
-	ylim=get(gca,'Ylim');
-	%recreate x_m and y_m
-	x_m=linspace(xlim(1),xlim(2),size(F,2));
-	y_m=linspace(ylim(2),ylim(1),size(F,1)); %getframe reverse axis...
-	%plot the data in another figure
-	figure; set(gcf,'position',P);
-	imagesc(x_m,y_m,F); set(gca,'Ydir','normal');
-	prevplot=1;
-	prevplot2=1;
+nofigurecopy=getfieldvalue(options,'nofigurecopy',1);
+if ~nofigurecopy,
+	if ~isempty(get(0,'children')),%if there is already a figure (return the number of opened figures)
+		set(gcf,'Renderer','zbuffer'); %fixes a bug on Mac OS X (not needed in future Matlab version)
+		P=get(gcf,'position');
+		Fp=get(gca,'position');
+		F=getframe(gca);
+		F=F.cdata;
+		%get current axis
+		xlim=get(gca,'Xlim');
+		ylim=get(gca,'Ylim');
+		%recreate x_m and y_m
+		x_m=linspace(xlim(1),xlim(2),size(F,2));
+		y_m=linspace(ylim(2),ylim(1),size(F,1)); %getframe reverse axis...
+		%plot the data in another figure
+		figure; set(gcf,'position',P);
+		imagesc(x_m,y_m,F); set(gca,'Ydir','normal','Position',Fp,'Xlim',xlim,'Ylim',ylim);
+		prevplot=1;
+		prevplot2=1;
+	else
+		figure
+		prevplot=0;
+		prevplot2=0;
+	end
 else
-	figure
-	prevplot=0;
-	prevplot2=0;
+	g=get(gca,'children');
+	L=length(g);
+	prevplot=L;
+	prevplot2=L;
 end
 
@@ -348,3 +358,5 @@
 
 %close window
-close;
+if ~nofigurecopy,
+	close;
+end
