No BSD License  

4.5

4.5 | 24 ratings Rate this file 13 Downloads (last 30 days) File Size: 719 Bytes File ID: #3277

maximize

by

 

17 Apr 2003 (Updated )

Maximize a figure window from the command line.

| Watch this File

File Information
Description

Uses an undocumented figure property to maximize a figure window in a hardware independent way.

Acknowledgements

This file inspired Subfig.

MATLAB release MATLAB 6.5 (R13)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (26)
28 Apr 2010 Jamuna

compiled matlab GUI with maximize function in linux,
throws warning "File is empty" at runtime in linux.
Help ?????????????

24 Nov 2009 Julian Ehlers

set(gcf,'Units','normalized', 'WindowStyle','docked','OuterPosition',[0 0 1 1]); will maximize the figure in a way that is analagous to hitting the 'maximize' button in windows.

03 Dec 2008 Stephen Andrews

Does what I want it to. Saves time. Fun!

02 Oct 2008 Kevin Conrad

Very useful.

16 Aug 2008 Reza Farrahi Moghaddam

Very helpful.

03 Jul 2008 Alex Leung

Simple but Perfect!

25 Jun 2008 Jim Alanoly

Very useful... thank you. Couple of improvements:

1. When you set the "outerposition" property, the figure's "ActivePositionProperty" automtically changes. So you need to remember what it was, and then reset it later, as you do with "units" property.

2. On Windows, the maximized figure window is obscured by the taskbar at the bottom... (31 pixels on XP and Vista). So, you may want to get the screensize and adjust the "outerposition" proportionately. E.g., for a screen with vertical resolution of 1050, for "outerposition," I will have [0, 31/1050, 1, (1050-31)/1050].

25 May 2008 Andrew Tan

Thank you!

22 May 2008 Edgar Guevara

Simple and very useful

15 May 2008 Johannes Korsawe

Sometimes just the small features are a great help...thank you for finding this.

18 Apr 2008 Diego Torquemada

works in Matlab 2007b, under Linux

12 Mar 2008 A V

Works for me...R2007a

20 Dec 2007 O P

works good on Linux, debian matlab 7.4

03 Oct 2007 Buuk Delft

Works great!

11 Sep 2007 Gili rosenberg

Worked for me, thanks!

23 Aug 2007 Nicolas BERCHER

Just what I was looking for (working good under Linux/Fedora/KDE & Matlab R13)!

14 Jun 2007 John Smith

handy

10 May 2007 Jose The Dude

It works fine.

I usually use a taskbar with two rows of buttons, in this case it is not exactly the same as clicking the maximize button, but I can stand it.

04 May 2007 Samuel Pichardo

Under R2006a and CentOS 5 (Gnome) it has the same behavior than the maximize button.

11 Feb 2007 Noelmir Castro

Works fine.

16 Oct 2006 Chris Jones

Seems to work fine - much better than the (0,'ScreenSize') method.

06 Mar 2006 Igor de Vries

doesn't do the same as pressing the "maximize" button and doesn't take the size of the taskbar into consideration.

15 Sep 2005 THomas Rebotier

MAximizing in the Windows sense appears to be impossible in Matlab. Either it should be a figure property, or there should be status-sniffing of the get(0,'ScreenSize') property, but that would discard the taskbar. I use a right hand vertical taskbar on a wide screen, other users in the group either followed me or kept the bottom task bar. I can't make figures fir everybody's screen. Bummer.

09 May 2005 Angel Zeitoune

Work fine to me, but does not maximize really the window

19 Aug 2003 Jérôme Bastianelli

it's only a change of the size inside Matlab (three lines of command), but it does not make what happen when you click on the "maximize" square on the right top of a windows window.

12 May 2003 Henk Luinge

Usefull! Changes figure size to entire screen, but does not maximize it in the ms-windows sense.

Contact us