Save axes handle when plotting In MATLAB
问题 I have script handling figures so that I can print and input them in a latex document with scale = 1 and everything looks nice. In this context I want to save the figure, axes and legend handles. Is there a way to save them like when using fig = figure . I know two 'hacks' 1) nfig = nfig+1; fig = figure(nfig); plot() ax = gca leg = legend() 2) nfig = nfig+1; fig = figure(nfig); ax = subplot(1,1,1) plot() leg = legend() My script function fig_set(fig,ax,leg,width,heigth,font_size) %% fig_set