2010-08-30 87 views
15

我有一张图需要在纸上按照精确的尺寸打印出来,因为它在纸上,从纸上看它会测量一些东西。什么是最简单的(有可能)是这样做的吗?在纸上打印精确尺寸的MATLAB图

回答

23

编辑

%# create some plot, and make axis fill entire figure 
plot([0 5 0 5], [0 10 10 0]), axis tight 
set(gca, 'Position',[0 0 1 1]) 

%# set size of figure's "drawing" area on screen 
set(gcf, 'Units','centimeters', 'Position',[0 0 5 10]) 

%# set size on printed paper 
%#set(gcf, 'PaperUnits','centimeters', 'PaperPosition',[0 0 5 10]) 
%# WYSIWYG mode: you need to adjust your screen's DPI (*) 
set(gcf, 'PaperPositionMode','auto') 

%# save as TIFF 
print -dtiff -r0 out.tiff 

(*):http://www.mathworks.com/help/matlab/creating_plots/printing-images.html

screenshot

+0

嗨荷银。谢谢回答。奥基,我了解了上述部分......那么是什么? – Rook 2010-08-30 14:13:25

+0

@Rook:请参阅此页:http://www.mathworks.com/access/helpdesk/help/techdoc/creating_plots/f2-14338.html – Amro 2010-08-30 14:14:18

+0

@Amro - 是的,我想我甚至设法绊倒页面,同时寻找它。但它只处理屏幕/纸张上图像的比例。我需要一种以cm为单位的方式,例如,我希望图像在纸上出来有多大(我的处理器上有一个非常大的绘图仪,并且希望绘制一些50x100cm的图 - 但它们需要正好是50x100cm,因为学生会从中读取数值)。 – Rook 2010-08-30 14:17:24