Automatically print 16 thumbnail graphs

1 次查看(过去 30 天)
BGC
BGC 2013-8-31
I need to embed in a program the ability to produce 16 small graphs and then print them on a single A4 page. Should be simple but nothing that I have tried works! However when I use printpreview and manually select 'fill page' and then print, that works. The sample program is below;
% Test program to plot out 16 thumbnail graphs on a single A4 sheet of paper % Program DOES NOT WORK! It prints axes much as are seen on the screen % but NOT the whole graph. The X and Y arrays are an attempt to locate % where the plots should sit on the paper. However if I use printpreview, % select fill page and then print, printing gives me what I want. % obviously I want to use this to print out thumbanail view of around 200 % files for visual comparison
figure(100) set(gcf, 'PaperType', 'A4') set(gcf, 'PaperOrientation', 'portrait') set(gcf, 'PaperUnits', 'centimeters') set(gcf, 'PaperSize', [20.98 29.68]) file='dummy file'; X=[3 12 3 12 3 12 3 12 3 12 3 12 3 12 3 12]'; Y=[24 24 21 21 18 18 15 15 12 12 9 9 6 6 3 3]'; data=[1:99]; % This is just dummy data to test the thumbnail print nprint=0; for i=1:32 nprint=nprint+1 set(gcf, 'Position', [X(nprint) Y(nprint) 6.5 2.0]) subplot(8,2,nprint), plot(data) xlabel(file) if nprint==16 print -dwinc -f100 %printpreview(100) % This works if 'fill plot' selected pause clf nprint=0; end end
Would greatly appreciate anyone's help to resolve this
  1 个评论
per isakson
per isakson 2013-8-31
编辑:per isakson 2013-9-1
  • Markup the text. Try the buttons, {}Code and ?Help.
  • Are there any warning or error messages?

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Directed Graphs 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by