Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Maximize.minimize invisible figure window

Subject: Maximize.minimize invisible figure window

From: K

Date: 16 Feb, 2012 07:44:12

Message: 1 of 4

Hello all,

Lately I've been playing with maximizing figures. A bunch of tools are available for this end.
Of the tools available I personally like maximize.m and a JavaFrame solution detailed in:
http://undocumentedmatlab.com/blog/minimize-maximize-figure-window/

The problem with them all is they won't allow figure window maximization/minimization while figure "Visible" property is set to 'off'.

Does any one have a clue how do I managed to maximize/minimize unvisible figures (i.e. 'Visible' property is set to 'off')?

Thx,
K

Subject: Maximize.minimize invisible figure window

From: K

Date: 16 Feb, 2012 08:44:11

Message: 2 of 4

"K " <dkkddkkd@walla.com> wrote in message <jhic4c$d0s$1@newscl01ah.mathworks.com>...
> Hello all,
>
> Lately I've been playing with maximizing figures. A bunch of tools are available for this end.
> Of the tools available I personally like maximize.m and a JavaFrame solution detailed in:
> http://undocumentedmatlab.com/blog/minimize-maximize-figure-window/
>
> The problem with them all is they won't allow figure window maximization/minimization while figure "Visible" property is set to 'off'.
>
> Does any one have a clue how do I managed to maximize/minimize unvisible figures (i.e. 'Visible' property is set to 'off')?
>
> Thx,
> K

Not quite what I'm looking for but attempt to solve this one is:
set(gcf, 'Units', 'normalized', 'Position', [0, 0, 1, 1])
It does not change figure window to 'Maximize' but rather change the size of a normal figure window to fit the entire window.
The plus is it works fine with unvisible figure windows.

Any neater sol.?

Subject: Maximize.minimize invisible figure window

From: Yair Altman

Date: 16 Feb, 2012 13:20:16

Message: 3 of 4

"K " <dkkddkkd@walla.com> wrote in message <jhic4c$d0s$1@newscl01ah.mathworks.com>...
> Hello all,
>
> Lately I've been playing with maximizing figures. A bunch of tools are available for this end.
> Of the tools available I personally like maximize.m and a JavaFrame solution detailed in:
> http://undocumentedmatlab.com/blog/minimize-maximize-figure-window/
>
> The problem with them all is they won't allow figure window maximization/minimization while figure "Visible" property is set to 'off'.
>
> Does any one have a clue how do I managed to maximize/minimize unvisible figures (i.e. 'Visible' property is set to 'off')?
>
> Thx,
> K


Find the actual Java Frame reference handle in the list returned by java.awt.Frame.getFrames(), and then invoke setMinimized(1) on the relevant reference handle. Note that if your figure has never before been visible, then the Java frame is not yet created and this will not work.

Yair Altman
http://UndocumentedMatlab.com
Read my book: Undocumented Secrets of Matlab-Java Programming

Subject: Maximize.minimize invisible figure window

From: K

Date: 16 Feb, 2012 15:47:31

Message: 4 of 4

"Yair Altman" wrote in message <jhivqg$aqa$1@newscl01ah.mathworks.com>...
> "K " <dkkddkkd@walla.com> wrote in message <jhic4c$d0s$1@newscl01ah.mathworks.com>...
> > Hello all,
> >
> > Lately I've been playing with maximizing figures. A bunch of tools are available for this end.
> > Of the tools available I personally like maximize.m and a JavaFrame solution detailed in:
> > http://undocumentedmatlab.com/blog/minimize-maximize-figure-window/
> >
> > The problem with them all is they won't allow figure window maximization/minimization while figure "Visible" property is set to 'off'.
> >
> > Does any one have a clue how do I managed to maximize/minimize unvisible figures (i.e. 'Visible' property is set to 'off')?
> >
> > Thx,
> > K
>
>
> Find the actual Java Frame reference handle in the list returned by java.awt.Frame.getFrames(), and then invoke setMinimized(1) on the relevant reference handle. Note that if your figure has never before been visible, then the Java frame is not yet created and this will not work.
>
> Yair Altman
> http://UndocumentedMatlab.com
> Read my book: Undocumented Secrets of Matlab-Java Programming

Thx Yair,

Figure is invisibly created using
h = figure('Visible','off')
Actually, I don't want the figure to be visible at all.
The maximization process is crucial for the fig to be saved properly using hgeport().

IS there a way to maximize the figure in this manner?

10X,
K

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us