本文介绍了在纸上以精确尺寸打印MATLAB图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个图,该图需要在纸上精确打印出来,因为它是按比例绘制的,因此要在纸上进行一些测量.哪种方法最简单(有可能)?
I have a plot that needs to be printed out in exact dimensions on paper, since it is in scale and from it on paper some things will be measured. What would be the easiest (is it possible at all) way to do it?
推荐答案
编辑:
%# 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
这篇关于在纸上以精确尺寸打印MATLAB图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!