From: byan on
it does not work for subplot

"Donn Shull" <donn.shull.no_spam(a)aetoolbox.com> wrote in message <g5ns0f$eib$1(a)fred.mathworks.com>...
> There is not a single command to do this you can use the
> following commands to di this:
>
> fig = gcf;
> style = hgexport('factorystyle');
> style.Bounds = 'tight';
> hgexport(fig,'-clipboard',style,'applystyle', true);
> drawnow;
>
> You should create a function to do this which includes
> proper errorchecking.
>
>