Index: /issm/trunk-jpl/src/m/exp/expdisp.m
===================================================================
--- /issm/trunk-jpl/src/m/exp/expdisp.m	(revision 18659)
+++ /issm/trunk-jpl/src/m/exp/expdisp.m	(revision 18660)
@@ -5,46 +5,33 @@
 %
 %   Usage:
-%      expdisp(domainoutline,varargin)
-%      expdisp(domainoutline,figurenumber,linestyle,linewidth,unitmultiplier)
+%      expdisp(domainoutline,options)
+%
+%   Available options:
+%      - 'figure'     : figure number or handle
+%      - 'linestyle'  : line style ('r--','-y',...)
+%      - 'linewidth'  : line width (1,2,...)
+%      - 'multiplier' : coordinate multiplier (10^3 if the plot is in km)
+%      - 'title'      : do we add contour names to each contour
 %
 %   Example:
-%      expdisp('Domain.exp',1,'--r',2,10^3);
+%      expdisp('Domain.exp','figure',1,'linestyle','--r','linewidth',2,'multiplier',10^3);
 %
 %   See also EXPMASTER, EXPDOC
 
-%Get options
-options = pairoptions();
+%Get and process options
+options = pairoptions(varargin{:});
+unitmultiplier = getfieldvalue(options,'multiplier',1);
+linewidth      = getfieldvalue(options,'linewidth',1);
+linestyle      = getfieldvalue(options,'linestyle','-r');
 
-%check nargin
-if ~nargin | nargin>5
-	help expdisp
-	error('expdisp error message: bad usage');
-end
-
-%parse input
-if nargin<=1,
-	figurenumber=1;
-else
-	figurenumber=varargin{1};
-end
-if nargin<=2
-	linestyle='r-';
-else
-	linestyle=varargin{2};
-end
-if nargin<=3
-	linewidth=1;
-else
-	linewidth=varargin{3};
-end
-if nargin<=4
-	unitmultiplier=1;
-else
-	unitmultiplier=varargin{4}; if isnan(unitmultiplier), unitmultiplier=1; end
-end
-
+%read file
 domain=expread(domainoutline);
 
-figure(figurenumber),hold on
+%Create figure if needed and hold
+if exist(options,'figure'),
+	figure(getfieldvalue(options,'figure'));
+end
+hold on
+
 for i=1:length(domain),		
 	if domain(i).nods==1
Index: /issm/trunk-jpl/src/m/plot/applyoptions.m
===================================================================
--- /issm/trunk-jpl/src/m/plot/applyoptions.m	(revision 18659)
+++ /issm/trunk-jpl/src/m/plot/applyoptions.m	(revision 18660)
@@ -254,5 +254,5 @@
 			linewidthi=linewidth{i};
 		end
-		expdisp(filenamei,gcf,stylei,linewidthi,getfieldvalue(options,'unit',1));
+		expdisp(filenamei,'linestyle',stylei,'linewidthi',linewidthi,'multiplier',getfieldvalue(options,'unit',1));
 	end
 end
