redraw graph