about summary refs log tree commit diff
path: root/sourcecodes/bnt-master/KPMtools/initFigures.m
diff options
context:
space:
mode:
Diffstat (limited to 'sourcecodes/bnt-master/KPMtools/initFigures.m')
-rw-r--r--sourcecodes/bnt-master/KPMtools/initFigures.m48
1 files changed, 48 insertions, 0 deletions
diff --git a/sourcecodes/bnt-master/KPMtools/initFigures.m b/sourcecodes/bnt-master/KPMtools/initFigures.m
new file mode 100644
index 00000000..6161b50e
--- /dev/null
+++ b/sourcecodes/bnt-master/KPMtools/initFigures.m
@@ -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);