2010-08-30 88 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