I tried with what you suggested to make an Arrow class. To
> begin with, I only put an Line2D instance. I searched for
> table stuff in axes.py, matlab.py to make the arrow
> importable from matplotlib.matlab. Then I also try a very
> very simple demo and I expect to see a simple
> line. However, I can not see it. Could someone tell me what
> is the problem. Here is my very very rudimental codes.
Nowhere in your code do you actually draw the arrows in self.arrows.
In Axes.draw you would need to do
for arrow in self.arrows:
And this should work.
However, you can avoid all the overhead of add_arrow, and keeping a
list of arrows in self.arrows simply by doing
def arrow(self, x, y, *args, **kwargs):
a = Arrow(x,y, *args, **kwargs)
Ie, call add_artist which is a generic method for adding artists to
Hope this helps,