You'll probably need to put in a loop to (a) pause for a fewmilliseconds and (b) refresh the graph or screen repeatedly.