Daniel@0: % initFigures Daniel@0: % Position 6 figures on the edges of the screen. Daniel@0: % [xmin ymin w h] where (0,0) = bottom left Daniel@0: % Numbers assume screen resolution is 1024 x 1280 Daniel@0: Daniel@0: global FIGNUM NUMFIGS Daniel@0: FIGNUM = 1; NUMFIGS = 6; Daniel@0: Daniel@0: screenMain = true; % set to false if initializing figures for second screen Daniel@0: %screenMain = false; Daniel@0: Daniel@0: if screenMain Daniel@0: xoff = 0; Daniel@0: else Daniel@0: %xoff = 1280; Daniel@0: xoff = -1280; Daniel@0: end Daniel@0: Daniel@0: % 2 x 3 design Daniel@0: w = 400; h = 300; Daniel@0: xs = [10 450 875] + xoff; Daniel@0: ys = [650 40]; Daniel@0: Daniel@0: if 0 Daniel@0: % 3x3 design Daniel@0: w = 350; h = 250; Daniel@0: xs = [10 380 750]+xoff; Daniel@0: ys = [700 350 10]; Daniel@0: end Daniel@0: Daniel@0: Daniel@0: Nfigs = length(xs)*length(ys); Daniel@0: if screenMain Daniel@0: fig = 1; Daniel@0: else Daniel@0: fig = Nfigs + 1; Daniel@0: end Daniel@0: Daniel@0: for yi=1:length(ys) Daniel@0: for xi=1:length(xs) Daniel@0: figure(fig); Daniel@0: set(gcf, 'position', [xs(xi) ys(yi) w h]); Daniel@0: fig = fig + 1; Daniel@0: end Daniel@0: end Daniel@0: Daniel@0: % To plot something on the next available figure (with wrap around), use Daniel@0: % sfigure(FIGNUM); clf; FIGNUM = wrap(FIGNUM+1, NUMFIGS);