Changeset 27292
- Timestamp:
- 09/26/22 05:15:59 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/plot/plotmodel.m
r27291 r27292 10 10 11 11 %get number of subplots 12 subplotwidth=ceil(sqrt( options.numberofplots));12 subplotwidth=ceil(sqrt(numberofplots)); 13 13 14 14 %if nlines and ncols specified, then bypass. … … 24 24 25 25 %check that nlines and ncols were given at the same time! 26 if ((exist(options.list{1},'ncols') & ~exist(options.list{1},'ncols')) | (~exist(options.list{1},'ncols') & exist(options.list{1},'n icols')))26 if ((exist(options.list{1},'ncols') & ~exist(options.list{1},'ncols')) | (~exist(options.list{1},'ncols') & exist(options.list{1},'ncols'))) 27 27 error('plotmodel error message: nlines and ncols need to be specified together, or not at all'); 28 end 29 30 % Add option for subplot, only support one subplot per one plotmodel call 31 subindex = 0; 32 if (exist(options.list{1},'subplot')) 33 subops = getfieldvalue(options.list{1},'subplot',NaN); 34 nlines = subops(1); 35 ncols = subops(2); 36 subindex = subops(3); 37 % change the width 38 subplotwidth = ncols; 39 % Turn off new figure option for subplot 40 options.list{1}=addfield(options.list{1},'figurestatement','off'); 41 % Turn off clf option for subplot 42 options.list{1}=addfield(options.list{1},'clf','off'); 28 43 end 29 44 … … 32 47 33 48 %Create figure 34 if strcmpi(getfieldvalue(options.list{1},'figurestatement','on'),'on'),49 if (strcmpi(getfieldvalue(options.list{1},'figurestatement','on'),'on')) 35 50 f=figure(figurenumber); 36 51 else … … 86 101 else 87 102 set(gcf,'Position',figposition); 88 89 90 103 end 104 elseif strcmpi(getenv('USER'),'inwoo') 105 set(gcf,'Position',[910 242 560 420]); 91 106 end % }}} 92 107 93 %Use zbuffer renderer (s noother colors) and white background108 %Use zbuffer renderer (smoother colors) and white background 94 109 set(f,'Renderer','zbuffer','color',getfieldvalue(options.list{1},'figurebackgroundcolor','w')); 95 110 … … 97 112 try, 98 113 for i=1:numberofplots, 99 plot_manager(getfieldvalue(options.list{i},'model',md),options.list{i},subplotwidth,nlines,ncols,i); 100 %List all unused options 114 if subindex 115 plot_manager(getfieldvalue(options.list{i},'model',md),options.list{i},subplotwidth,nlines,ncols,subindex); 116 else 117 plot_manager(getfieldvalue(options.list{i},'model',md),options.list{i},subplotwidth,nlines,ncols,i); 118 end 119 %List all unused options 101 120 if getfieldvalue(options.list{i},'displayunused',1), 102 121 displayunused(options.list{i}) … … 108 127 end 109 128 else 110 error('plotmodel error message: no output data found. 129 error('plotmodel error message: no output data found.'); 111 130 end
Note:
See TracChangeset
for help on using the changeset viewer.