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()
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)
dpsanders@…1147…
http://sistemas.fciencias.unam.mx/~dsanders
Cubículo / office: #414, 4o. piso del Depto. de Física
Tel.: +52 55 5622 4965
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
A.py (66 Bytes)
B.py (18 Bytes)
···
On 2013/07/20 10:16 PM, David P. Sanders wrote:
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)
dpsanders@...1147... <mailto:dpsanders@…1147…>
Dr David P. Sanders: Homepage
<http://sistemas.fciencias.unam.mx/~dsanders>
Cub�culo / office: #414, 4o. piso del Depto. de F�sica
Tel.: +52 55 5622 4965