Printing a MATLAB plot in exact dimensions on paper

后端 未结 1 1117
心在旅途
心在旅途 2020-11-29 04:58

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 (i

相关标签:
1条回答
  • 2020-11-29 05:31

    EDIT:

    %# 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 讨论(0)
提交回复
热议问题