in reply to plotting slowly

$counter=0; # delay loop while ($counter <= 100000) { $counter++; }

Ouch! How about sleep? It doesn't eat up the CPU, it delays the same way on every processor, and it's clear in the code how long the delay is.