File Exchange

image thumbnail

Align figures without overlap

version 1.2.0.0 (5.01 KB) by YongGyu Han
This function set figures' position to avoid overlap of figures.

3 Downloads

Updated 18 Sep 2016

View Version History

View License

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

Cite As

YongGyu Han (2021). Align figures without overlap (https://www.mathworks.com/matlabcentral/fileexchange/55468-align-figures-without-overlap), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (5)

BONGSUNG SEO

YongGyu Han

@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.

Sergey Khlebov

I guess, you forgot to update the file, Please check. There is no "target_mon" input argument.

Sergey Khlebov

Sergey Khlebov

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

MATLAB Release Compatibility
Created with R2014a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!