Mercurial > repos > public > sbplib
comparison savepng.m @ 445:236744dda401
Clean up savepng().
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 12 Apr 2017 13:01:20 +0200 |
parents | b4ae78a1c2b9 |
children |
comparison
equal
deleted
inserted
replaced
443:12db86a8ec7b | 445:236744dda401 |
---|---|
9 % Copy size of figure in centimeters to a place where saveas will honor it | 9 % Copy size of figure in centimeters to a place where saveas will honor it |
10 h.Units = 'centimeters'; | 10 h.Units = 'centimeters'; |
11 h.PaperUnits = 'centimeters'; | 11 h.PaperUnits = 'centimeters'; |
12 h.PaperPosition(3:4) = h.Position(3:4); | 12 h.PaperPosition(3:4) = h.Position(3:4); |
13 | 13 |
14 % Save as a bugged eps file. | |
15 print(h,filename,'-dpng',sprintf('-r%d',dpi)); | 14 print(h,filename,'-dpng',sprintf('-r%d',dpi)); |
16 | 15 |
17 h.Units = handle_units; % Restore the old units | 16 h.Units = handle_units; % Restore the old units |
18 | |
19 | |
20 | |
21 end | 17 end |