Is it possible to update a plot every 2 seconds, for example ?
Or, even better, to just call a function that will update the plot given the new x, y values ?
Additional Information –
I am developing a neural network, and would like to update a line chart showing the output vs the targets after each iteration.
Many thanks
How are you creating the neural network? It may be possible to insert code into what you are already doing that would update your plot.
There are functions in the
tcltk2package that will run code after specified waiting times and will allow other functions to run while waiting, but these can be very dangerous in creating race conditions, or changing objects that other code depends on. You will still need a way to acces the network information as it is being created (and this is very dificult if it is inside of another function), this will probably also slow the fitting code down a bit as it needs to keep checking the time and doing the other calculations.It is probably best to insert the update code into the fitting code rather that depending on timing. If you show us more about how you are fitting the network (reproducible example) then we may be able to give a more detailed answer.