annotate toolboxes/FullBNT-1.0.7/KPMtools/initFigures.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
rev   line source
wolffd@0 1 % initFigures
wolffd@0 2 % Position 6 figures on the edges of the screen.
wolffd@0 3 % [xmin ymin w h] where (0,0) = bottom left
wolffd@0 4 % Numbers assume screen resolution is 1024 x 1280
wolffd@0 5
wolffd@0 6 global FIGNUM NUMFIGS
wolffd@0 7 FIGNUM = 1; NUMFIGS = 6;
wolffd@0 8
wolffd@0 9 screenMain = true; % set to false if initializing figures for second screen
wolffd@0 10 %screenMain = false;
wolffd@0 11
wolffd@0 12 if screenMain
wolffd@0 13 xoff = 0;
wolffd@0 14 else
wolffd@0 15 %xoff = 1280;
wolffd@0 16 xoff = -1280;
wolffd@0 17 end
wolffd@0 18
wolffd@0 19 % 2 x 3 design
wolffd@0 20 w = 400; h = 300;
wolffd@0 21 xs = [10 450 875] + xoff;
wolffd@0 22 ys = [650 40];
wolffd@0 23
wolffd@0 24 if 0
wolffd@0 25 % 3x3 design
wolffd@0 26 w = 350; h = 250;
wolffd@0 27 xs = [10 380 750]+xoff;
wolffd@0 28 ys = [700 350 10];
wolffd@0 29 end
wolffd@0 30
wolffd@0 31
wolffd@0 32 Nfigs = length(xs)*length(ys);
wolffd@0 33 if screenMain
wolffd@0 34 fig = 1;
wolffd@0 35 else
wolffd@0 36 fig = Nfigs + 1;
wolffd@0 37 end
wolffd@0 38
wolffd@0 39 for yi=1:length(ys)
wolffd@0 40 for xi=1:length(xs)
wolffd@0 41 figure(fig);
wolffd@0 42 set(gcf, 'position', [xs(xi) ys(yi) w h]);
wolffd@0 43 fig = fig + 1;
wolffd@0 44 end
wolffd@0 45 end
wolffd@0 46
wolffd@0 47 % To plot something on the next available figure (with wrap around), use
wolffd@0 48 % sfigure(FIGNUM); clf; FIGNUM = wrap(FIGNUM+1, NUMFIGS);