proper graph resizing