Hi,
I’m using wxpython with matplotlib, I now have a figurecanvas embedded in my program and I can plot stuff using:
a = self.fig.gca()
a.plot(x,y)
But what is the easiest and fastest way to draw a circle? I saw that the artist class has a draw_arc function… but I don’t know how to use the artist class with my figure canvas… Like I can’t do a.draw_arc() for instance …
Can anyone point me in the right direction?
Thanks,
Soren
S�ren Nielsen wrote:
Hi,
I'm using wxpython with matplotlib, I now have a figurecanvas embedded in my
program and I can plot stuff using:
a = self.fig.gca()
a.plot(x,y)
But what is the easiest and fastest way to draw a circle? I saw that the
artist class has a draw_arc function.. but I don't know how to use the
artist class with my figure canvas.. Like I can't do a.draw_arc() for
instance ...
Can anyone point me in the right direction?
Thanks,
Soren
from matplotlib.patches import Circle
cir = Circle( (0,0), radius=0.5)
a.add_patch(cir)
Manuel