I'm using matplotlib. Code:
for new_counter in range(counter+1):
print new_counter
Qbers = final_data[(final_data["Dataset"]==counter) & (final_data["Qber"] > 0) ]
x1 = Qbers.index.tolist()
y1 = Qbers["Qber"].tolist()
Raws = final_data[(final_data["Dataset"]==counter) & (final_data["Raw key"] > 0) ]
x2 = Raws.index.tolist()
y2 = Raws["Raw key"].tolist()
# Two subplots, the axes array is 1-d http://matplotlib.org/examples/pylab_examples/subplots_demo.html
f, axarr = plt.subplots(2, sharex=True)
axarr[0].grid()
axarr[0].plot(x1, y1)
axarr[0].set_title('Sharing X axis')
axarr[1].grid()
axarr[1].plot(x2, y2)
plt.savefig(str(counter)+'foo.eps')
plt.clf()
I'm receiving only file with last plot, and with my data I should receive 6 of them. How to fix that? Additional question: How to prevent creation of interactive window with plot?