import matplotlib.pyplot as pltimport numpy as npfrom matplotlib.patches import Ellipse# Fixing random state for reproducibilitynp.random.seed(19680801)NUM =250ells = [Ellipse(xy=np.random.rand(2) *10, width=np.random.rand(), height=np.random.rand(), angle=np.random.rand() *360)for i inrange(NUM)]fig, ax = plt.subplots()ax.set(xlim=(0, 10), ylim=(0, 10), aspect="equal")for e in ells: ax.add_artist(e) e.set_clip_box(ax.bbox) e.set_alpha(np.random.rand()) e.set_facecolor(np.random.rand(3))plt.show()