In a nutshell: An updated Version of https://de.mathworks.com/matlabcentral/fileexchange/328-tilefigs-m for HG2 and multi-monitor-support
Automatically detects the usable desktop space and figure borders for overlap-free arrangements.
Julian Hapke (2021). tilefigs (https://www.mathworks.com/matlabcentral/fileexchange/62375-tilefigs), MATLAB Central File Exchange. Retrieved .
Inspired by: tilefigs.m, maximize
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Create scripts with code, output, and formatted text in a single executable document.
@Johannes, that feature was introduced in R2018b, the maximize submission was updated to use WindowState, but I also incorporated the essential lines from that submission into tilefigs. so one does not need to download another submission as well.
neat function and quite easy to manoeuvre with the comments in the code.
I subbed line 62 as I didn't feel the need for your 'maximize' function when it was only used to determine size of maximized window.
It was easily replaced by
f.WindowState = 'maximized';
which is in my opinion a neat implementation by Mathworks to maximize a window.
Error at line 107:
pos = [...
usable(figonmon,1) + (col' - 1) .* width(figonmon) ...
usable(figonmon,2) + (nrows - row') .* height(figonmon) ...
width(figonmon) ...
height(figonmon) ...
];
Error using horzcat
Dimensions of arrays being concatenated are not consistent.
Fixed by changing to:
pos = [...
usable(figonmon(:),1) + (col' - 1) .* width(figonmon(:)) ...
usable(figonmon(:),2) + (nrows - row') .* height(figonmon(:)) ...
width(figonmon(:)) ...
height(figonmon(:)) ...
];
Ah, see now that maximize is listed as a requirement! Ignore last message
@jkr sorry to hear, unfortunately I do not have access to any device with mac os for testing, on Windows 7 it works fine with Matlab 2018a.
Did not work at all for me. Of 6 open figures, it minimizes 4 on one screen, 2 on the other.
Running R2018a (9.4...) 64 bit on an iMac with two monitors.