Changeset 2562
- Timestamp:
- 10/29/09 15:39:58 (15 years ago)
- Location:
- issm/trunk/src/m/classes/public/plot
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/classes/public/plot/plot_section.m
r2559 r2562 172 172 173 173 %apply options 174 if ~exist(options,'title'), 175 options=addfielddefault(options,'title','Section value'); 176 end 174 options=addfielddefault(options,'title','Section value'); 177 175 if strcmpi(md.type,'2d') 178 176 options=addfielddefault(options,'colorbar',0); -
issm/trunk/src/m/classes/public/plot/plot_transient_field.m
r2488 r2562 12 12 end 13 13 14 fontsize =getfieldvalue(options,'fontsize',14);15 fontweight=getfieldvalue(options,'fontweight','n');16 figurenum =getfieldvalue(options,'figure',1);17 18 14 %Figure out the iterations to plot and check if it is possible 19 15 steps=getfieldvalueerr(options,'steps'); … … 22 18 error(['plot_transient_field error message: problem with the steps requested, must be an interger between 0 and ' num2str(maxiteration)]); 23 19 end 20 subplotwidth=ceil(sqrt(length(steps))); 24 21 25 22 %Figure out the field to plot … … 46 43 end 47 44 48 string='plotmodel(md'; 45 %process mes only once 46 [x y z elements is2d]=processmesh(md,options); 47 48 %plot data for all steps 49 49 for i=1:length(steps), 50 string=[string ',''data'',md.results.transient(' num2str(steps(i)) ').' field ',''title'',''' field ' at time ' num2str(md.results.transient(steps(i)).time) ' a''']; 50 51 %process data and change title if needed 52 [data isongrid isquiver]=processdata(md,md.results.transient(steps(i)).(field),options); 53 options=addfielddefault(options,'title',[field ' at time ' num2str(md.results.transient(steps(i)).time) ' a']); 54 55 %create plot of step i 56 subplot(subplotwidth,subplotwidth,i); 57 plot_unit(x,y,z,elements,data,isongrid,is2d,isquiver,options) 58 51 59 end 52 string=[string ',''colorbar#all'',''on'',''fontsize'',' num2str(fontsize) ',''fontweight'',''' fontweight ''',''figure'',' num2str(figurenum)];53 54 %Add options55 if exist(options,'caxis'),56 caxis_opt=getfieldvalue(options,'caxis',[]);57 string=[string ',''caxis#all'',[' num2str(caxis_opt(1)) ',' num2str(caxis_opt(2)) ']'];58 end59 60 %Execute string61 string=[string ');'];62 eval(string);63 clear string;
Note:
See TracChangeset
for help on using the changeset viewer.