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