Matlab Issue with saving figure to an image file -
i plotting equations figures in matlab , trying save figure screws saved image.
this how image displayed matlab figure: 
however, when try save image gets screwed , comes out this: 
is there way me save properly?
i have tried following commands , none of them work.
print(gcf,'-dbmp', 'eqn') saveas(gcf,'eqn.bmp') i appreciate help!
thanks!
to faithful reproduction of see on screen, have use getframe , frame2im commands follows,
f = getframe(gcf); [im,map] = frame2im(f); if isempty(map) imwrite(im,'figure.bmp'); else imwrite(im,map,'figure.bmp'); end if use saveas or print, file different dimensions , objects scaled differently, cause equations drawn incorrectly. operation of getframe ensures file resolution reflects have on screen. documentation:
resolution of captured frames
the resolution of framed image depends on size of axes in pixels when
getframecalled.getframecommand takes snapshot of screen, if axes small in size (e.g.,because have restricted view window within axes),getframecaptures fewer screen pixels, ...
this means there no redrawing @ different scale (what messes equation).
Comments
Post a Comment