www.gusucode.com > mbcguitools 工具箱 matlab 源码程序 > mbcguitools/@mvgraph2d/printcopy.m
function LYT=printcopy(obj,fig) %PRINTCOPY Create a printer-friendly copy of mvgraph1d % % LYT=PRINTCOPY(OBJ,FIG) % Copyright 2000-2015 The MathWorks, Inc. and Ford Global Technologies, Inc. % copy main axes always ax = xregGui.HGPlotCopy(obj.axes, fig); axPanel=mbcgui.widget.AxesContainer('AxesHandle', ax, 'Border', [45 45 10 10]); ud = obj.DataPointer.info; switch ud.type case {'graph','sparse'} % remove image object from axes h=findobj(get(ax,'Children'),'Type','image'); delete(h); LYT=xreglayerlayout(fig,'elements',{axPanel}); case 'image' % remove line object from axes h=findobj(get(ax,'Children'),'Type','line'); delete(h); % remove buttondownfcn h=get(ax,'Children'); set(h,'ButtonDownFcn',''); % add colorbar axcol=copyobj(obj.colorbar.axes,fig); set(axcol,'UserData',[]); set(get(axcol,'Children'),'ButtonDownFcn','','UserData',[]); LYT=xreggridlayout(fig,'correctalg','on',... 'dimension',[2 1],... 'rowsizes',[-1 20],... 'elements',{axPanel,axcol},... 'border',[0 25 0 0]); end