Edited - Python plot persistence windows
Question: Each time I launch my program, my plots are erased after each execution.

I would like the following situation:

  1. Launch program 1 and plot in figure 1
  2. Stop the execution of program 1
  3. Lauch program 2 and plot in figure 1
  4. Retrieve a pdf file where the plot of program 1 and program 2 are superimposed

here is my code:

    
    
    z = np.zeros(5) 
    fig,axarr = plt.subplots(nrows=2, ncols=3)
    fig.subplots_adjust()
    
    lig,col = 0,0
    axarr[lig,col].plot(tt,z[0,:],'k')
    
    #plt.ion() 
    #plt.draw()                                                                         
    plt.show(block=True)
    #plt.show()
    

**EDIT:** Ok maybe I could solve this problem with the following approach: Is
it possible to get the ax of a figure that was opened by an other excetion of
of program ?


Answer: `plt.show(block=True)` should work.

Other hack would be using pause function as shown below:

    
    
    from matplotlib import pylab
    pylab.plot(range(10), range(10))
    pylab.pause(2**31-1)
    

