Newbie question about show()

The show() function works fine. But newbies ...

  > 1. There are two different toolbars that can be selected by
  > '.matplotlibrc': "classic" and "toolbar2" I tried both and
  > there is no "close figure" button. The only way I found to
  > close the figure was to press the mouse in the window upper
  > right corner. Is it possible to "customize" the toolbar
  > icon menu?

Currently, there is no way to do this without hacking into the src
code of your backend of choice. There used to be a close button, but
Steve Chaplin pointed me to some user interface docs from GNOME which
argued that it is a bad idea to put close buttons on toolbars, and so
I removed them. There has been a discussion and partial
implementation of customizable toolbars on the devel list. This will
happen eventually.

  > 2. How can I pre-assign a window size/position? When I
  > issue the show() function the window position and size
  > assume default values. How can I change these values?

  > 3. When I issue the show() function, the window opens with
  > the names "Figure 1", "Figure 2", etc How can I custumize
  > the window name?

  > 4. Is it possible to change the window attributes (eg.,
  > modal or not, enable/disable minimize)?

The only way currently to control the window size from the matlab
interface is to set the figure size with the figsize option, eg
figure(figsize=(10,12)). However, you can set window properties in a
backend dependent manner with the figure manager instance.

  manager = get_current_fig_manager()

  backend_gtk* : manager.window is a gtk.Window instance
  backend_wx* : manager.frame is a wxFrame instance
  backend_tkagg : manager.window is a Tk.Tk() instance
  backend_fltkagg : manager.window is a Fltk.Fl_Double_Window

Thus to set the title in a gtk* backend, you could do

manager = get_current_fig_manager()
manager.window.set_title('hi mom')

Of course, now your scripts won't work with other matplotlib

In theory, we could abstract the essential window calls and expose
them in a GUI neutral manner. We are trying to resist the urge to
become a GUI wrapping library so we can focus on being a plotting

If you need a lot of control over GUI properties, you may want to skip
the matlab interface and use the matplotlib API directly, eg build a
GTK app which embeds matplotlib. See examples/embedding_in*.py in the
matplotlib src distribution or at
explaining how to embed matplotlib in your GUI of choice.