import matplotlib.pyplot as plt
import matplotlib.patches as patches
ax = plt.axes()
p1 = patches.Circle((0.2, 0.3), 0.1, facecolor=(1, 0, 0))
p2 = patches.Rectangle((0.6, 0.6), 0.2, 0.1, facecolor=(1, 1, 0))
ax.add_patch(p1)
ax.add_patch(p2)
plt.pause(0.5)
ax.cla()