3 % To manage the saving of figures
6 % SAVEFIGURE:
boolean. If
true saving figure is done.
7 % Name: name of the destination file without extension (
string)
8 % percent: value
for resizing the figure
11 % OptFEM2DP1 [V1.0d] - Copyright (C) 2013 CJS (LAGA)
13 % This file is part of OptFEM2DP1.
14 % OptFEM2DP1 is free software: you can redistribute it and/or modify
15 % it under the terms of the GNU General Public License as published by
16 % the Free Software Foundation, either version 3 of the License, or
17 % (at your option) any later version.
19 % OptFEM2DP1 is distributed in the hope that it will be useful,
20 % but WITHOUT ANY WARRANTY; without even the implied warranty of
21 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 % GNU General Public License
for more details.
24 % You should have received a copy of the GNU General Public License
25 % along with
this program. If
not, see <http:
27 system(sprintf(
'mkdir -p images'));
28 eval(sprintf(
'print -depsc2 images/%s.eps',Name))
29 fprintf(' -> save figure(%d) in images/%s.eps\n',gcf,Name);
30 eval(sprintf('print -djpeg90 images/%s.jpg',Name))
31 fprintf(' -> save figure(%d) in images/%s.jpg\n',gcf,Name);
32 system(sprintf('convert -resize %d%% images/%s.jpg images/%s.png',percent,Name,Name));
33 fprintf(' -> save figure(%d) in images/%s.png (resize %d%%)\n',gcf,Name,percent);