function align_figure(hfig, target_mon, width, height, margin_top, margin_left, margin_btw_width, margin_btw_height)
% align_figure: align figures without overlap
%
% Yonggyu Han / Yonsei university / 2016.02.18
%
% This function set figures' position to avoid overlap of figures.
%
% Example:
%
% hfig1 = figure();
% hfig2 = figure();
% hfig3 = figure();
% hfig = [hfig1 hfig2 hfig3];
% align_figure(hfig);
%
% target_mon (for multiple monitor users)
% ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
% s
% s margin_top
% s
% s wwwwwwwwwwwwwwwwwwwwwwwwww wwwwwwwwwwwwwwwwwwwwwwwwww
% s w width w w w
% s w w w w
% s w h w w w
% s w e w w w
% s margin_left w i fig1 w margin_btw_width w fig2 w
% s w g w w w
% s w h w w w
% s w t w w w
% s w w w w
% s w w w w
% s wwwwwwwwwwwwwwwwwwwwwwwwww wwwwwwwwwwwwwwwwwwwwwwwwww
% s
% s margin_btw_height
% s
% s wwwwwwwwwwwwwwwwwwwwwwwwww wwwwwwwwwwwwwwwwwwwwwwwwww
% s w w w w
% s w w w w
% s w w w w
% s w w w w
% s w fig3 w w fig4 w
% s w w w w
% s w w w w
% s w w w w
% s w w w w
% s w w w w
% s wwwwwwwwwwwwwwwwwwwwwwwwww wwwwwwwwwwwwwwwwwwwwwwwwww
% s
% s
YongGyu Han (2021). Align figures without overlap (https://www.mathworks.com/matlabcentral/fileexchange/55468-align-figures-without-overlap), MATLAB Central File Exchange. Retrieved .
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.
@Sergey Khlebov
Your guess is right. I forgot to update the file. Sorry and thank you for the reply. I re-uploaded the up-to-date m file. Please check it.
I guess, you forgot to update the file, Please check. There is no "target_mon" input argument.
Here
http://www.mathworks.com/matlabcentral/fileexchange/48480-automatically-arrange-figure-windows
it was said to work on dual screen.
I expected it to be able to choose the monitor for dipslaying - however, there is no such an input argument.
Also, overall usability of this function (greater number of input arguments) is inferior to this one:
http://www.mathworks.com/matlabcentral/fileexchange/48480-automatically-arrange-figure-windows