better window resizing for the graph.