Re: [Matplotlib-users] modifying a plot from an imported module

2014-06-17 Thread felix_werner
Perfect, many thanks! So the trick was _not_ to do show() in A.py (Moreover, doing draw() in A.py also seems necessary... even though I don't really get why -- actually in my own more complicated program, it works also without this draw...) -- View this message in context:

Re: [Matplotlib-users] modifying a plot from an imported module

2014-06-16 Thread Mike Kaufman
Hi. The short answer is yes. orion:~ % cat A.py from matplotlib.pyplot import * print A plot([0,1],[0,1]) draw() orion:~ % cat B.py from matplotlib.pyplot import * import A print B plot([0.5,0.75],[0,1]) draw() show() Using ipython: In [2]: run -i B.py A B and the figure shows both