real time plotting with matplotlib