How do I make MATLAB print in WYSIWYG mode?

5 views (last 30 days)
Many times when using OpenGL to render my figures, the resolution is not as good as it is on the screen. When using the Painters algorithm, objects shift position.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 23 Jun 2016
There are several ways to ensure that your objects maintain a consistent look when printing. With MATLAB you can do the following:
1) Set the PaperPositionMode of the figure to 'auto'. The following command forces the figure's size and location on the printed page to directly reflect the figure's size on the screen:
 
set(gcf,'PaperPositionMode','auto')
2) Set the figure's screen position to the same dimensions as the figure's PaperPosition.
 
ppos = get(gcf,'PaperPosition');
su = get(gcf,'Units');
pu = get(gcf,'PaperUnits');
set(gcf,'Units',pu);
spos = get(gcf,'Position');
set(gcf,'Position',[spos(1) spos(2) ppos(3) ppos(4)])
set(gcf,'Units',su)

More Answers (0)

Categories

Find more on Interactive Control and Callbacks in Help Center and File Exchange

Products


Release

R2016a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!