transform_stack: change y_upper and y_lower to ymin and ymax