No License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from

3.9 | 15 ratings Rate this file 30 Downloads (last 30 days) File Size: 2.26 KB File ID: #328 Version: 1.0



Charles Plum (view profile)


Display multiple figures simultaneously by tiling the screen with all open figures.

| Watch this File

File Information

The TILEFIGS program is used to display multiple figures simultaneously by tiling the screen with all open figures.
TILEFIGS usage: tilefigs ([nrows ncols],border_in pixels)

Restriction: maximum of 100 figure windows

Without arguments, tilefigs will determine the closest N x N grid for all open figures.
TILEFIGS has only been run under Matlab 5


This file inspired Figure Management Utilities, Subfigure, and The Krouchev Journal Figure Advanced Matlab Toolkit.

MATLAB release MATLAB 5.2 (R10)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (19)
03 Feb 2017 Niels Barella

03 Feb 2017 Niels Barella

27 Sep 2016 Marcin Konowalczyk

I suggest adding a persistent variable to keep track of the last set position of the figures. Then, before the body of the script is run, you could check whether the figures are already in the position they would be set to and 'return' the script. This makes it more efficient for repeated plotting in a loop.

18 Feb 2016 YongGyu Han

This works in dual screen:

Comment only
03 Sep 2015 Jean-Michel

I wish it would manage dual screen but it works pretty well, thanks

14 Oct 2014 Valerio Biscione

14 Oct 2014 Valerio Biscione

08 Nov 2012 Brendan

Brendan (view profile)


for a version which implements many of the suggestions in the comments

Comment only
14 Mar 2012 Murat

useful function, the overlap problem can be walked around by modifying the line 72

30 Nov 2011 Logan

Logan (view profile)

Improvement, so that rows and cols are not limited to the same number (ie with 12 figures this will give you a 3x4 grid):

Change line 35 to
ncols = ceil(numfigs/nrows);

07 May 2010 Ben

Ben (view profile)

Good program!

To get rid of the figure overlap in later revisions of Matlab, just subtrac 30 from ylen. An easy way to do this is to change line 68 to:

set(hands(pnum),'Position',[ xpos ypos xlen ylen-30 ]); % move figure

26 Mar 2010 Emery

Emery (view profile)

As mentioned earlier, there is a slight overlap issue in later revisions, but this is a minor issue. Thanks!

21 Feb 2009 Tim

Tim (view profile)

Looks like it only works if figure units are pixels. Should check for actual units, save them, do tiling, then restore original units.
Should also allow a selection of figure handles to be passed, rather than always tiling all figures.

Comment only
14 Jun 2008 Dimitri Shvorob

Works even with Matlab 2008a, but not quite perfectly: figures overlap slightly.

13 Aug 2006 Ben Abbott

Did just what I wanted it to do.
I'm running MATLAB Version (R2006a) on Mac OS 10.4.7.
This routine doesn't respect the dock, and since Matlab does, this creates problem when tiling 1 row of figures and filling the screen. For example,

>> tilefigs([1,N])

However, this problem is easily resolved by increasing the rows a bit :-)

>> tilefigs(1.1,N)

28 Jul 2006 Stephan Lennartz

good function,
works still under ML-R14 (Version 7.1..)!
Here's a little test-program for trying out:
- - - - - - - - - - -
function test_tilefigs
%% test-function for tilefigs
% feel free to modify the constants
N=0; % counting index for creating figures
for R=(1:4); % Rows
for C=(1:5) % Columns
N=N+1; % count index starts with 1 and will not be incr finally
figure (N); % create a number of figures

%% CALL tilefigs, display for 5 s and remove the figures again
tilefigs ([R C],1); % R rows, C columns , 10 pixels border
pause(5); % wait 5 s
for indx=(1:N); close(figure(indx)); end
end % test-function

27 Apr 2006 Linda Hamilton

It seems that it doesn't tile the figures properly if I am using 19" TFT screen. Any suggestions?

Comment only
20 Feb 2006 Jay Simon

A useful contribution, thanks.

03 Aug 2005 Dennis Dean

It was exactly what I was looking for. Script will save me time. There are some constants embedded within the code that I needed to tweak. I would like to have seen the constants defined as variables at the top of the file

Contact us