Changeset 3222
- Timestamp:
- 03/08/10 15:12:29 (15 years ago)
- Location:
- issm/trunk/src/m/classes/public
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/classes/public/loadresultsfromcluster.m
r3151 r3222 29 29 30 30 %read log files onto fields 31 %md.errlog=char(textread([md.name '.errlog'],'%s','delimiter','\n'));32 %md.outlog=char(textread([md.name '.outlog'],'%s','delimiter','\n'));31 md.errlog=char(textread([md.name '.errlog'],'%s','delimiter','\n')); 32 md.outlog=char(textread([md.name '.outlog'],'%s','delimiter','\n')); 33 33 if ~isempty(md.errlog), 34 34 disp(['loadresultsfromcluster info message: error during solution. Check your errlog and outlog model fields']); -
issm/trunk/src/m/classes/public/printmodel.m
r2827 r3222 55 55 set(fig, 'InvertHardcopy', getfieldvalue(options,'hardcopy')); 56 56 57 %Use higher resolution to anti-alias and use zbuffer to have smooth colors58 print(fig, '-zbuffer','-dtiff',['-r' num2str(get(0,'ScreenPixelsPerInch')*getfieldvalue(options,'resolution'))],filename);59 57 60 %some trimming involved? 61 if ~strcmpi(format,'pdf'), 62 if strcmpi(getfieldvalue(options,'trim'),'on'), 63 system(['convert -trim ' filename '.tif ' filename '.tif']); 58 %we could have several formats, as a cell array of strings. 59 formats=format; 60 if ~iscell(formats), 61 formats={formats}; 62 end 63 64 %loop on formats: 65 for i=1:length(formats), 66 format=formats{i}; 67 68 %Use higher resolution to anti-alias and use zbuffer to have smooth colors 69 print(fig, '-zbuffer','-dtiff',['-r' num2str(get(0,'ScreenPixelsPerInch')*getfieldvalue(options,'resolution'))],filename); 70 71 %some trimming involved? 72 if ~strcmpi(format,'pdf'), 73 if strcmpi(getfieldvalue(options,'trim'),'on'), 74 system(['convert -trim ' filename '.tif ' filename '.tif']); 75 end 76 end 77 78 %margin? 79 if ~strcmpi(format,'pdf'), 80 if strcmpi(getfieldvalue(options,'margin'),'on'), 81 marginsize=getfieldvalue(options,'marginsize'); 82 system(['convert -border ' num2str(marginsize) 'x' num2str(marginsize) ' -bordercolor "white" ' filename '.tif ' filename '.tif']); 83 end 84 end 85 86 %frame? 87 if ~strcmpi(format,'pdf'), 88 if strcmpi(getfieldvalue(options,'frame'),'on'), 89 framesize=getfieldvalue(options,'framesize'); 90 framecolor=getfieldvalue(options,'framecolor'); 91 system(['convert -border ' num2str(framesize) 'x' num2str(framesize) ' -bordercolor "' framecolor '" ' filename '.tif ' filename '.tif']); 92 end 93 end 94 95 %convert image to correct format 96 if ~strcmpi(format,'tiff') & ~strcmpi(format,'tif'), 97 system(['convert ' filename '.tif ' filename '.' format]); 98 delete([ filename '.tif']); 64 99 end 65 100 end 66 67 %margin?68 if ~strcmpi(format,'pdf'),69 if strcmpi(getfieldvalue(options,'margin'),'on'),70 marginsize=getfieldvalue(options,'marginsize');71 system(['convert -border ' num2str(marginsize) 'x' num2str(marginsize) ' -bordercolor "white" ' filename '.tif ' filename '.tif']);72 end73 end74 75 %frame?76 if ~strcmpi(format,'pdf'),77 if strcmpi(getfieldvalue(options,'frame'),'on'),78 framesize=getfieldvalue(options,'framesize');79 framecolor=getfieldvalue(options,'framecolor');80 system(['convert -border ' num2str(framesize) 'x' num2str(framesize) ' -bordercolor "' framecolor '" ' filename '.tif ' filename '.tif']);81 end82 end83 84 %convert image to correct format85 if ~strcmpi(format,'tiff') & ~strcmpi(format,'tif'),86 system(['convert ' filename '.tif ' filename '.' format]);87 delete([ filename '.tif']);88 end
Note:
See TracChangeset
for help on using the changeset viewer.