<｜begin▁of▁sentence｜>### Instruction:
Given a rectangle initially created with a lower-left corner at (0.1, 0.2), width 0.5, and height 0.3, how would you change the position of its bottom edge to a new Y coordinate of 0.5 using the matplotlib library?
### Response:
import matplotlib.pyplot as plt

# Create a rectangle
rectangle = plt.Rectangle((0.1, 0.2), 0.5, 0.3)

# Set the Y coordinate of the bottom edge of the rectangle
rectangle.set_y(0.5)

# Alternate method to set the bottom edge using bottom property
rectangle.bottom = 0.5

# Create a figure and axes
fig, ax = plt.subplots()

# Add the rectangle to the axes
ax.add_patch(rectangle)

# Display the plot
plt.show()
<|EOT|>
