diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/toolboxes/FullBNT-1.0.7/KPMtools/initFigures.m	Tue Feb 10 15:05:51 2015 +0000
@@ -0,0 +1,48 @@
+% initFigures
+% Position 6 figures on the edges of the screen.
+% [xmin ymin w h] where (0,0) = bottom left
+% Numbers assume screen resolution is 1024 x 1280
+
+global FIGNUM NUMFIGS
+FIGNUM = 1; NUMFIGS = 6;
+
+screenMain = true; % set to false if initializing figures for second screen
+%screenMain = false;
+
+if screenMain
+  xoff = 0; 
+else
+  %xoff = 1280;
+  xoff = -1280;
+end
+
+% 2 x 3 design
+w = 400; h = 300;
+xs = [10 450 875] + xoff;
+ys = [650 40];
+
+if 0
+% 3x3 design
+w = 350; h = 250;
+xs = [10 380 750]+xoff;
+ys = [700 350 10];
+end
+
+
+Nfigs = length(xs)*length(ys);
+if screenMain
+  fig = 1; 
+else
+  fig = Nfigs + 1;
+end
+
+for yi=1:length(ys)
+  for xi=1:length(xs)
+    figure(fig);
+    set(gcf, 'position', [xs(xi) ys(yi) w h]);
+    fig = fig + 1;
+  end
+end
+
+% To plot something on the next available figure (with wrap around), use
+% sfigure(FIGNUM); clf; FIGNUM = wrap(FIGNUM+1, NUMFIGS);