[转载]【Matlab】 print输出图像大小调整

通常默认情况下,print命令输出图像为 8*5inches,无视屏幕显示尺寸
通过命令行修改的话有三步

1 设置paperposition为manual
set(gcf,’PaperPositionMode’, ‘manual’)
[ auto | {manual} ]

2 设置paperunit
set(gcf,’PaperUnits’,’inches’)
[ {inches} | centimeters | normalized | points ]

3 设置paperposition
set(gcf,’PaperPosition’,[left,bottom,width,height])

例如
set(gcf, ‘PaperPositionMode’, ‘manual’);
set(gcf, ‘PaperUnits’, ‘points’);
set(gcf, ‘PaperPosition’, [0 0 640 480]);

要使图像比例输出与屏幕显示的一致,可以使用如下命令
屏幕显示图像尺寸可以plot时用 set(gcf,’position’,[left bottom width height]) 调整,或者print之前拖动窗口手动调整
This example exports a figure at screen size to a 24-bit TIFF file, myfigure.tif.

% set(gcf,’position’,[80 100 800 600]) % 如果手动拖放,则不需要这一行命令
set(gcf, ‘PaperPositionMode’, ‘auto’) % Use screen size
print -dtiff myfigure

Factory Default PaperPosition

The factory default PaperPosition,
[0.25 2.5 8.0 6.0]
is designed to print the figure on 8.5-by-11 inch paper in portrait orientation. It results in a printed figure that is about as large as can fit on the paper (with a one-quarter inch border on the left and right sides) and is centered on the paper. The width of eight inches and the height of six inches give an aspect ratio (ratio of width to height) that is the same as the default figure aspect ratio on the screen.

[转载]【Matlab】 print输出图像大小调整 - 简单人生 - 简单人生

你可能感兴趣的:([转载]【Matlab】 print输出图像大小调整)