Rank: 2539 based on 60 downloads (last 30 days) and 1 file submitted
photo

Brendan

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by Brendan
Updated   File Tags Downloads
(last 30 days)
Comments Rating
05 Dec 2012 tilefigs MATLAB function for tiling figures on the screen. Author: Brendan tiling, figure, tilefigs, multiple, tile 60 8
  • 5.0
5.0 | 5 ratings
Comments and Ratings by Brendan View all
Updated File Comments Rating
02 Jun 2013 tilefigs MATLAB function for tiling figures on the screen. Author: Brendan

Anne, to fix the fact that the images don't go all the way down the screen, you can edit the default border.

% Set the default border if none is specified [left, bottom, right, top]
if monitor > 1
if ~exist('border','var') || isempty(border)
border = [0 0 0 0];
end
else
if ~exist('border','var') || isempty(border)
border = [0 30 0 0];
end
end

Change the second border to [0 0 0 0]

Are you setting resize to false? If not, I don't understand the issue with the figure overlap. Tilefigs uses the "outer position" information from the figure handle, so either there is an error in my math somewhere, or matlab does not compute the outer position of the figures properly. A hack to fix this would be to add in a leftRightSpacing ( or topBottomSpacing), though I agree it's not ideal.

05 Dec 2012 tilefigs MATLAB function for tiling figures on the screen. Author: Brendan

Updated to allow for non-pixel units for figures

08 Nov 2012 tilefigs.m Display multiple figures simultaneously by tiling the screen with all open figures. Author: Charles Plum

See http://www.mathworks.com/matlabcentral/fileexchange/38581-tilefigs

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

Comments and Ratings on Brendan's Files View all
Updated File Comment by Comments Rating
22 Oct 2014 tilefigs MATLAB function for tiling figures on the screen. Author: Brendan Schenberg, eduardo

i love this function, but all of a sudden now I got the following error (which I can not understand nor solve):

Error using set
Width and height must be > 0
Error in tilefigs (line 169)
set(handles(pnum),'OuterPosition',[xLocation yLocation width height]);

I appreciate any help! working in matlab R2013b (8.2.0.701) in mac OS 10.9.4

thanks

16 Oct 2014 tilefigs MATLAB function for tiling figures on the screen. Author: Brendan Pablo, Peter

15 May 2014 tilefigs MATLAB function for tiling figures on the screen. Author: Brendan castro, alejandro

Works very well as described on my linux machine.

12 Dec 2013 tilefigs MATLAB function for tiling figures on the screen. Author: Brendan Rico

Thanks for this nice function!

There is one problem, though, when you are running matlab in linux. In this case 'MonitorPositions' has a different meaning (see http://www.mathworks.de/de/help/matlab/ref/rootobject_props.html).

Thus, linux users need to replace

matlabMonitorSize = monitorPositions(:,3:4) - monitorPositions(:,1:2) + 1;

with

matlabMonitorSize = monitorPositions(:,3:4);

12 Sep 2013 tilefigs MATLAB function for tiling figures on the screen. Author: Brendan Jonathan

I love this function, it is very useful and works well.

My only issue is that (as you describe in the comments) it does not correctly position the figures on multi-monitor setups. This is because get(0,'MonitorPositions') returns the monitor boundaries in 'display' coordinates with (1,1) at the upper left corner of monitor 1, while figure positions start at the lower left corner.

If you replace your definition of 'matlabMonitorLocation' with:
matlabMonitorLocation = [monitorPositions(:,1) (monitorPositions(1,4) - monitorPositions(:,4) + 1)];

it works perfectly (at least on my 4 monitor Windows 7 setup on MATLAB R2013a).

Contact us