import matplotlib import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_subplot(111) poly = plt.Polygon(((0,0),(0.5,0),(0.5,0.5),(0,0.5)),fc="#770000") ax.add_patch(poly) plt.show()