optimize figure proportions