FIx to draw graphs in real time