The maximum dimension will always be set to MAX_SIZE. You can determine the maximum dimension by subtracting minX from maxX to get the width of the points in the x direction. The same with the ys the get the height of the points in the y direction.
If the width is greater than the height, then we'll make the width of the GraphWin to be MAX_SIZE. The window's height will then be the height determined by the points divided by the width determined by the points times MAX_SIZE. So if the points gave a width of 500 and a height of 200, the height of the window should be 200/500 times MAX_SIZE or 2/5th of the MAX_SIZE (So if MAX_SIZE = 1000, 1000 wide and (2/5) * 1000 = 400 tall.)
Otherwise, make the height of the window, MAX_SIZE and the width a fraction of it.