You want multiple consecutive python sessions to share a common Matplotlib window. I do not see the possibility of sharing these windows with separate processes, especially when the original owner can stop working at any given time.
- , PDF, , python.
. / , matplotlib:
matplotlib.pyplot
script matplotlib , plt.show():
import matplotlib.pyplot as plt
import numpy as np
import pickle
ax = plt.subplot(111)
x = np.linspace(0, 10)
y = np.exp(x)
plt.plot(x, y)
pickle.dump(ax, file('myplot.pickle', 'w'))
python, plt.show(). script , :
import matplotlib.pyplot as plt
import pickle
while True:
ax = pickle.load(file('myplot.pickle'))
plt.show()
Alternative
python Ipython, script. , , , .
import matplotlib.pyplot as plt
fig = plt.figure(0)
fig.clf()
plt.show()