-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathelf_support_formatA4strip.m
More file actions
29 lines (24 loc) · 1.18 KB
/
elf_support_formatA4strip.m
File metadata and controls
29 lines (24 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
function [fh, corrFac] = elf_support_formatA4strip(fignum, screenpos)
% figh = elf_support_formatA4l(fignum, screenpos)
if nargin<2, screenpos = 1; end
if nargin<1, fh = figure; else, fh = figure(fignum); end
ss = get(0, 'ScreenSize'); % [1 1 1920 1200]
screenHeight = ss(4);
screenWidth = ss(3);
if screenWidth>2000
% For larger screens, always use a 1000 pixel wide window. This makes it easiest to keep figures consistent
figureWidth = 2000;
corrFac = 1;
else
% For smaller screens, reduce the window size, but keep some room for the taskbar
figureWidth = 0.9*screenWidth;
corrFac = figureWidth/2000; % this correction factor can later be used to adjust fontsizes and other absolute sizing
end
figureHeight = figureWidth / 4 / 21 * 29.7; % width in pixels
pos = [1+(screenpos-1)*figureWidth screenHeight-figureHeight-30 figureWidth figureHeight];
orient(fh, 'landscape');
set(fh, 'MenuBar', 'none', 'ToolBar', 'none', 'Units', 'pixels', 'NumberTitle', 'off', 'position', pos, ...
'PaperUnits', 'centimeters', 'PaperSize', [29.7 21], ...
'color', 'w', 'paperpositionmode', 'manual', 'paperposition', [1 .5 27.7 20], ...
'Renderer', 'painters');
drawnow;