0

I have a GUI that shells a program generating a plot as output.
Each time the user presses 'OK', a new plot is made, appearing in a new window. What I'd like to have is the following:

  1. User starts GUI, enters required input parameters and presses 'OK'.
  2. A 'main' figure window opens and a plot appears as a docked figure in the main window.
  3. User changes the settings and confirms with 'OK'.
  4. Another docked figure showing a new plot is added to the main window.
  5. etc.

For me it's not clear how to:

  • Define the main/parent figure window that will hold the generated children plot figures.
  • Add these plot figures to the main figure window.

If I start with:

set(0,'DefaultFigureWindowStyle','docked')

is it possible then to further customize some properties of the main window?
I think of title, position, no menubar, ...

Can anyone help me with some hints?
Thanks!


Notes:

  • It seems that it's not possible to dock figures in a predefined figure window; you can only dock to the desktop. That's what I understand until now since searching the internet.
kadéem
  • 187
  • 2
  • 10
  • similar question: [Have Matlab figures docked by default](http://stackoverflow.com/q/6911176/97160) – Amro Jul 11 '12 at 13:50
  • @Amro: Thanks for the comment, I picked up that code while searching. I'll edit my question to be more specific. – kadéem Jul 11 '12 at 13:57
  • you are correct; the target of docking is the "Figures" panel, which is part of the MATLAB IDE. I don't know if it helps, but the "Figures" panel itself can be docked/undocked from the MATLAB desktop – Amro Jul 11 '12 at 15:52

3 Answers3

0

Yes, you surely can customize the figure window.

You can set the title of the figure window using 'Name' property in the following way:

set(gcf,'Name','Title');

Similarly, you can use 'Menubar' property and 'Toolbar' property to control the display of the toolbar.

Also, you can set the position using 'Position' property.

Refer to the following link for all the figure properties you can set:

http://www.mathworks.com/help/techdoc/ref/figure_props.html

Hope it helps...all the best!!

  • Thanks for your answer, but changing the properties of a figure window is no problem for me; maybe it was not clearly stated. I wondered if it possible to change the name/title of the Figures window (= part of Matlab IDE as Amro stated), because using the 'docked' property sends the additional figures to this Figures panel. You can add and use other so-called groups/containers, but then you must tweak at the Java level... – kadéem Jul 11 '12 at 18:51
0

Yes, Matlab does not allow to dock figures into several different windows but there is a tool on Matlab file exchange which provides that functionality:

http://www.mathworks.com/matlabcentral/fileexchange/16650

0

Call this for each figure window you want to dock together:

plotbrowser(fh, 'on'); plotbrowser(fh, 'off');

where: fh - figure handle

this trick is using singleton property of plotbrowser.