I'm new at python and new at graphics!! the thing is that I'm implementing an EKF map-based localization and I want to plot the uncertenty ellipse. For that I do, each time I want to update the figure with all the values I call a function call animate, which inside has this:
ellipse = matplotlib.patches.Arc([x_B_1[0,0],x_B_1[0,1]],P_B_1[0,0],P_B_1[1,1],x_B_1[0,2]*180/pi,color='green', linewidth='0.5')
ax.add_patch(ellipse)
And some other stuff
The thing is that by doing this all the ellipses saty in the figure and I get a mess (I can not post a picture of the figure because it's my first post and the forum does not allow me to do it), I want just the last ellipse.
How can I do it?
I can not do that because everything in the figure is lost, I just want to erase the ellipse not the rest of the things that I have on that figure, maybe it's not possible... Is there any option of updating the ellipse parameters so instead of drawing a new one I just update the one already drawn??
Cheers!