Real time plotting script