add test code of real time plot