subplots and forked show()

Hi, Two quick little issues I haven't been able to figure

    > out how to fix on my own so far:

    > 1. Is there an easy way to change the spacing between
    > subplots, so that they aren't so crammed together? It's
    > none too pretty when the x-axis text for the upper plot is
    > overlapping or even below the title for the lower plot.

Which backend are you using? Chris Fuller submitted a tk widget for
just this purpose -
[fuse-devel] Re: Cant compile hello.c; have latest fuse installed | Filesystem in Userspace. It
would be fairly easy to port to other GUIs. It's on the list of things
to do, but I haven't had time. Other than that, your best option is
to manually set the axes size, eg using the 'axes' command or calling

  ax.set_position

    > 2. Is there a way to make the 'show()' command execute so
    > that the script keeps running (instead of waiting for the
    > windows to be closed), and to have the output persist past
    > the end of the run?

You should only call show once per script. I repeat, you should only
call show once per script -
http://matplotlib.sourceforge.net/faq.html#SHOW

matplotlib-0.60.2 has a "draw" command to force a canvas redraw. This
is non blocking. Earlier versions allow you to do, equivalently,
get_current_fig_manager().canvas.draw(). Does this do what you want?
I am not sure what you are after when you write "have the output
persist past the end of the run". Launch the python interpreter?

Please let me know what backend you are using and explain a bit more
what it is you are trying to do. Are you running in interactive mode?

JDH

Hi,

I am not in interactive mode, I am writing scripts that handle a bunch of data and then plot it all. However, when show() is called, the script stops and waits for all the windows it opens to be closed before continuing. What I was hoping for was a way to have the plots be drawn in windows that were no longer hooked into the script, such that the script could continue running (to completion) regardless of what happened to the open windows. I did try 'draw()', which does not appear to open any new windows.

In answer to your questions, here are the relevant lines from my .matplotlibrc:
backend : GTKAgg # the default backend
numerix : numarray #Numeric # Numeric or numarray
interactive : False # see http://matplotlib.sourceforge.net/interactive.htm

Thanks for everyone's help on subplot positioning (or avoidance ;)) - I'll take a look.

- Mark

···

On Jul 26, 2004, at 2:06 PM, John Hunter wrote:

    > 2. Is there a way to make the 'show()' command execute so
    > that the script keeps running (instead of waiting for the
    > windows to be closed), and to have the output persist past
    > the end of the run?

You should only call show once per script. I repeat, you should only
call show once per script -
http://matplotlib.sourceforge.net/faq.html#SHOW

matplotlib-0.60.2 has a "draw" command to force a canvas redraw. This
is non blocking. Earlier versions allow you to do, equivalently,
get_current_fig_manager().canvas.draw(). Does this do what you want?
I am not sure what you are after when you write "have the output
persist past the end of the run". Launch the python interpreter?

Please let me know what backend you are using and explain a bit more
what it is you are trying to do. Are you running in interactive mode?

JDH