Drawing the ellipses you need the lenght of the axes and the
angle of the big axis with the horizontal \(x\)-axis. For this you
may use the rad2deg and
the arctan functions of
the np module. A little
help (not necessary to follow):
from matplotlib.patches import Ellipse # modul for drawing
ax = plt.subplot(aspect='equal') # subfigure
ell = Ellipse(xy=(0,0), # fill in!
width=...,
height=...,
edgecolor='r',
angle=... )
ell.set_facecolor('none') # be empty
ax.add_artist(ell)
plt.plot(x, y, 'x') # these are the dots
plt.axis('equal')
plt.show()