import matplotlib.pyplot as plt

triangle = [(0, 0), (1, 0), (0.5, 1)]

x, y = zip(*triangle)

plt.figure()

plt.fill(x, y, 'b', alpha=0.5)

plt.xlim(-0.5, 1.5)
plt.ylim(-0.5, 1.5)
plt.gca().set_aspect('equal', adjustable='box')

plt.grid()
plt.title("Triangle")
plt.xlabel("X-axis")
plt.ylabel("Y-axis")

plt.show()