cannot understand http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.show

The last line of text below seems to say that setting block to either True or False causes an override of the blocking behavior. I don't think this is as intended. Which way round is it (in fact I find it has no effect)?

The problem I have is that using pyplot.show at the top level of a python script works correctly, but as soon as I out the same code inside a function, I see no plot.

How do I fix this?

Keith

http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.show

matplotlib.pyplot.show(*args, **kw)

In non-interactive mode, display all figures and block until the figures have been closed; in interactive mode it has no effect unless figures were created prior to a change from non-interactive to interactive mode (not recommended). In that case it displays the figures but does not block.

A single experimental keyword argument, block, may be set to True or False to override the blocking behavior described above.

Which version of matplotlib are you using, and which backend?

import matplotlib
print matplotlib.__version__, matplotlib.get_backend()

Cheers!
Ben Root

ยทยทยท

On Wed, Aug 7, 2013 at 11:45 AM, <keith.briggs@...644...> wrote:

The last line of text below seems to say that setting block to either True
or False causes an override of the blocking behavior. I don't think this
is as intended. Which way round is it (in fact I find it has no effect)?

The problem I have is that using pyplot.show at the top level of a python
script works correctly, but as soon as I out the same code inside a
function, I see no plot.

How do I fix this?

Keith

http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.show

matplotlib.pyplot.show(*args, **kw)

In non-interactive mode, display all figures and block until the figures
have been closed; in interactive mode it has no effect unless figures were
created prior to a change from non-interactive to interactive mode (not
recommended). In that case it displays the figures but does not block.

A single experimental keyword argument, block, may be set to True or False
to override the blocking behavior described above.