Mercurial > hg > camir-ismir2012
annotate toolboxes/FullBNT-1.0.7/KPMtools/initFigures.m @ 0:cc4b1211e677 tip
initial commit to HG from
Changeset:
646 (e263d8a21543) added further path and more save "camirversion.m"
author | Daniel Wolff |
---|---|
date | Fri, 19 Aug 2016 13:07:06 +0200 |
parents | |
children |
rev | line source |
---|---|
Daniel@0 | 1 % initFigures |
Daniel@0 | 2 % Position 6 figures on the edges of the screen. |
Daniel@0 | 3 % [xmin ymin w h] where (0,0) = bottom left |
Daniel@0 | 4 % Numbers assume screen resolution is 1024 x 1280 |
Daniel@0 | 5 |
Daniel@0 | 6 global FIGNUM NUMFIGS |
Daniel@0 | 7 FIGNUM = 1; NUMFIGS = 6; |
Daniel@0 | 8 |
Daniel@0 | 9 screenMain = true; % set to false if initializing figures for second screen |
Daniel@0 | 10 %screenMain = false; |
Daniel@0 | 11 |
Daniel@0 | 12 if screenMain |
Daniel@0 | 13 xoff = 0; |
Daniel@0 | 14 else |
Daniel@0 | 15 %xoff = 1280; |
Daniel@0 | 16 xoff = -1280; |
Daniel@0 | 17 end |
Daniel@0 | 18 |
Daniel@0 | 19 % 2 x 3 design |
Daniel@0 | 20 w = 400; h = 300; |
Daniel@0 | 21 xs = [10 450 875] + xoff; |
Daniel@0 | 22 ys = [650 40]; |
Daniel@0 | 23 |
Daniel@0 | 24 if 0 |
Daniel@0 | 25 % 3x3 design |
Daniel@0 | 26 w = 350; h = 250; |
Daniel@0 | 27 xs = [10 380 750]+xoff; |
Daniel@0 | 28 ys = [700 350 10]; |
Daniel@0 | 29 end |
Daniel@0 | 30 |
Daniel@0 | 31 |
Daniel@0 | 32 Nfigs = length(xs)*length(ys); |
Daniel@0 | 33 if screenMain |
Daniel@0 | 34 fig = 1; |
Daniel@0 | 35 else |
Daniel@0 | 36 fig = Nfigs + 1; |
Daniel@0 | 37 end |
Daniel@0 | 38 |
Daniel@0 | 39 for yi=1:length(ys) |
Daniel@0 | 40 for xi=1:length(xs) |
Daniel@0 | 41 figure(fig); |
Daniel@0 | 42 set(gcf, 'position', [xs(xi) ys(yi) w h]); |
Daniel@0 | 43 fig = fig + 1; |
Daniel@0 | 44 end |
Daniel@0 | 45 end |
Daniel@0 | 46 |
Daniel@0 | 47 % To plot something on the next available figure (with wrap around), use |
Daniel@0 | 48 % sfigure(FIGNUM); clf; FIGNUM = wrap(FIGNUM+1, NUMFIGS); |