Made graph scale with window size and re-draw on resize