On Wed, Oct 28, 2009 at 9:06 AM, Eero Nevalainen <eero.nevalai...@indagon.com> wrote: > Hi, > > I need to draw error ellipses on a scatterplot. I'm guessing someone has > done this before. > > I've found some examples, such as this one > http://matplotlib.sourceforge.net/examples/pylab_examples/ellipse_rotated.html > > That led to the artist tutorial, and... ARGH! INFORMATION OVERFLOW! > > Can someone explain to me, why I suddenly have to know so much about > matplotlib's internals to get an ellipse drawn?
Hi, I just made a function to draw uncertainty ellipses defined by a covariance matrix P: def plotEllipse(pos,P,edge,face): U, s , Vh = svd(P) orient = math.atan2(U[1,0],U[0,0]) ellipsePlot = Ellipse(xy=pos, width=math.sqrt(s[0]), height=math.sqrt(s[1]), angle=orient,facecolor=face, edgecolor=edge) ax = gca() ax.add_patch(ellipsePlot); show() return ellipsePlot To use it: ellipsePlot=plotEllipse([x,y],P,'black','0.3') Hope this helps, Tinne ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users