On 2013/07/20 10:16 PM, David P. Sanders wrote:
> I am trying to execute (with execfile) a script A.py containing
> matplotlib plotting commands from within a script B.py.
>
> Within B.py, I do execfile("A.py")
>
> The A.py script runs correctly, except that no plot is shown.
>
> I have checked that the A.py script does plot (to a separate window)
> when run
> with python A.py from the terminal.
> A.py does include plt.show()
David,
The attached scripts, which seem to be a minimal example of what you
describe, work for me with matplotlib 1.2.1, MacOSX backend.
Eric
>
> Could an expert on backends help, please!
>
> Thanks
> David.
>
> --
> Dr. David P. Sanders
>
> Profesor Titular "A" / Associate Professor
> Departamento de Física, Facultad de Ciencias
> Universidad Nacional Autónoma de México (UNAM)
>
> dps...@ci... <mailto:dps...@ci...>
> http://sistemas.fciencias.unam.mx/~dsanders
> <http://sistemas.fciencias.unam.mx/%7Edsanders>
>
> Cubículo / office: #414, 4o. piso del Depto. de Física
> Tel.: +52 55 5622 4965
|