Home > matutils > screen2png.m

screen2png

PURPOSE ^

SYNOPSIS ^

function screen2png(file,res)

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function screen2png(file,res)
0002 set(gcf,'paperpositionmode','auto')
0003 set(gca,'xticklabelmode','manual','yticklabelmode','manual')
0004 
0005 if ~exist('res')
0006   res=100
0007 end
0008 
0009 set(gcf,'Units','pixels');
0010 scrpos = get(gcf,'Position');
0011 newpos = scrpos/100;
0012 set(gcf,'PaperUnits','inches','PaperPosition',newpos)
0013 eval(sprintf('print -dpng -r%d %s',res,file))
0014

Generated on Sun 14-Jun-2015 17:12:45 by m2html © 2005