Mercurial > repos > public > sbplib
view savepng.m @ 770:0090a86d8b72 feature/grids
Improve mononomial and vandermonde functions to work in multiple dimension and adapt to sym or double inputs
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 27 Jun 2018 11:10:52 +0200 |
parents | 236744dda401 |
children |
line wrap: on
line source
% TODO % Let print size in inches as input parameter % Smaller boundingbox function savepng(h, filename, dpi) default_arg('dpi', 300) handle_units = h.Units; % Save the current units to be able to restore % Copy size of figure in centimeters to a place where saveas will honor it h.Units = 'centimeters'; h.PaperUnits = 'centimeters'; h.PaperPosition(3:4) = h.Position(3:4); print(h,filename,'-dpng',sprintf('-r%d',dpi)); h.Units = handle_units; % Restore the old units end