I've managed to set up dynamic graph of one variable in matplotlib:
def update_line(hl, new_data):
hl.set_xdata(np.append(hl.get_xdata(), new_data[0]))
hl.set_ydata(np.append(hl.get_ydata(), new_data[1]))
plt.draw()
cost_plot, = plt.plot([], [], 'b-')
plt.xlabel('iter')
plt.ylabel('cost')
plt.axis([0, set_size, 0, 10])
some for:
...
update_line(cost_plot, [iter, cost])
plt.draw()
plt.pause(0.001)
And with this code I'm plotting my cost function of my first neural network:
Graph of cost fun (network's still dead)
Now I want to do the same but for set of synapses, so I want multiple plots in one figure, updated dynamically by
update_line(plot, [iter, set of next values])
but I can't really find a way of doing this.
My data is stored in numpy's array
update_lineand pass in the correct line and data?plotandset of next values?