<｜begin▁of▁sentence｜>### Instruction:
Given a rectangle initially positioned at the origin with a width of 3 units and a height of 4 units, how would you change the height to 10 units while maintaining the position of the top edge using the matplotlib patches library?
### Response:
from matplotlib.patches import Rectangle

# Create a rectangle with specified width and height
rect = Rectangle((0, 0), width=3, height=4)

# Change the height of the rectangle
current_bottom = rect.get_y()
rect.set_height(10)

# Adjust the bottom edge of the rectangle so the top edge remains stationary
rect.set_y(current_bottom)

# Assuming we have a matplotlib Axes `ax`, add the rectangle to it
ax.add_patch(rect)
ax.set_xlim(-2, 5)
ax.set_ylim(-2, 12)
plt.show()
<|EOT|>
