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