Changeset 18660
- Timestamp:
- 10/20/14 09:45:24 (10 years ago)
- Location:
- issm/trunk-jpl/src/m
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/exp/expdisp.m
r18658 r18660 5 5 % 6 6 % Usage: 7 % expdisp(domainoutline,varargin) 8 % expdisp(domainoutline,figurenumber,linestyle,linewidth,unitmultiplier) 7 % expdisp(domainoutline,options) 8 % 9 % Available options: 10 % - 'figure' : figure number or handle 11 % - 'linestyle' : line style ('r--','-y',...) 12 % - 'linewidth' : line width (1,2,...) 13 % - 'multiplier' : coordinate multiplier (10^3 if the plot is in km) 14 % - 'title' : do we add contour names to each contour 9 15 % 10 16 % Example: 11 % expdisp('Domain.exp', 1,'--r',2,10^3);17 % expdisp('Domain.exp','figure',1,'linestyle','--r','linewidth',2,'multiplier',10^3); 12 18 % 13 19 % See also EXPMASTER, EXPDOC 14 20 15 %Get options 16 options = pairoptions(); 21 %Get and process options 22 options = pairoptions(varargin{:}); 23 unitmultiplier = getfieldvalue(options,'multiplier',1); 24 linewidth = getfieldvalue(options,'linewidth',1); 25 linestyle = getfieldvalue(options,'linestyle','-r'); 17 26 18 %check nargin 19 if ~nargin | nargin>5 20 help expdisp 21 error('expdisp error message: bad usage'); 22 end 23 24 %parse input 25 if nargin<=1, 26 figurenumber=1; 27 else 28 figurenumber=varargin{1}; 29 end 30 if nargin<=2 31 linestyle='r-'; 32 else 33 linestyle=varargin{2}; 34 end 35 if nargin<=3 36 linewidth=1; 37 else 38 linewidth=varargin{3}; 39 end 40 if nargin<=4 41 unitmultiplier=1; 42 else 43 unitmultiplier=varargin{4}; if isnan(unitmultiplier), unitmultiplier=1; end 44 end 45 27 %read file 46 28 domain=expread(domainoutline); 47 29 48 figure(figurenumber),hold on 30 %Create figure if needed and hold 31 if exist(options,'figure'), 32 figure(getfieldvalue(options,'figure')); 33 end 34 hold on 35 49 36 for i=1:length(domain), 50 37 if domain(i).nods==1 -
issm/trunk-jpl/src/m/plot/applyoptions.m
r18558 r18660 254 254 linewidthi=linewidth{i}; 255 255 end 256 expdisp(filenamei, gcf,stylei,linewidthi,getfieldvalue(options,'unit',1));256 expdisp(filenamei,'linestyle',stylei,'linewidthi',linewidthi,'multiplier',getfieldvalue(options,'unit',1)); 257 257 end 258 258 end
Note:
See TracChangeset
for help on using the changeset viewer.