Rescale the graph on window resize