def plot_gaussian_2D(mu, lmbda, color='<STR_LIT:b>', centermarker=True,label='<STR_LIT>',alpha=<NUM_LIT:1.>,ax=None,artists=None):
assert len(mu) == <NUM_LIT:2><EOL>ax = ax if ax else plt.gca()<EOL>t = np.hstack([np.arange(<NUM_LIT:0>,<NUM_LIT:2>*np.pi,<NUM_LIT>),<NUM_LIT:0>])<EOL>circle = np.vstack([np.sin(t),np.cos(t)])<EOL>ellipse = np.dot(np.linalg.cholesky(lmbda),circle)<EOL>if artists is None:<EOL><INDENT>point = ax.scatter([mu[<NUM_LIT:0>]],[mu[<NUM_LIT:1>]],marker='<STR_LIT:D>',color=color,s=<NUM_LIT:4>,alpha=alpha)if centermarker else None<EOL>line, = ax.plot(ellipse[<NUM_LIT:0>,:] + mu[<NUM_LIT:0>], ellipse[<NUM_LIT:1>,:] + mu[<NUM_LIT:1>],linestyle='<STR_LIT:->',<EOL>linewidth=<NUM_LIT:2>,color=color,label=label,alpha=alpha)<EOL><DEDENT>else:<EOL><INDENT>line, point = artists<EOL>if centermarker:<EOL><INDENT>point.set_offsets(np.atleast_2d(mu))<EOL>point.set_alpha(alpha)<EOL>point.set_color(color)<EOL><DEDENT>line.set_xdata(ellipse[<NUM_LIT:0>,:] + mu[<NUM_LIT:0>])<EOL>line.set_ydata(ellipse[<NUM_LIT:1>,:] + mu[<NUM_LIT:1>])<EOL>line.set_alpha(alpha)<EOL>line.set_color(color)<EOL><DEDENT>return (line, point) if point else (line,)<EOL>
Plots mean and cov ellipsoid into current axes. Must be 2D. lmbda is a covariance matrix.