Arrow Questions

I am trying to implement a dynamic graph in mpl, where users can drag
around the nodes, and the edges follow the nodes like rubber bands. I
have this working with regular edges, but I want to give the option of putting
arrows on the edges. I am running into some issues with the Arrow
classes.

With my Text, Rectangle, and Line2D objects I can get and set their
locations with methods such as get_position(), get_x(), and get_xdata()
respectively. But there are no such methods for any of the Arrow classes.
(By the way, it seems like these sorts of things would be in the base
classes, and much more standard).

What is the difference between Arrow, YAArrow, and FancyArrow anyway?
(Besides drastically different scales).

Some other features of the Arrow class that I would like very much are:

  • double headed arrows (one line with an arrow head on each end)

  • the ability to turn the arrow head on and off easily (Boolean parameter
    function)

Does anyone have any ideas on how to work around these issues?

Thanks,

-Ben

Bump.

···

From:
matplotlib-users-bounces@lists.sourceforge.net
[mailto:matplotlib-users-bounces@lists.sourceforge.net] On Behalf Of Ben Axelrod
Sent: Thursday, August 14, 2008
5:54 PM
To: Matplotlib
Subject: [Matplotlib-users] Arrow
Questions

I am trying to implement a dynamic graph in mpl, where users can drag
around the nodes, and the edges follow the nodes like rubber bands. I
have this working with regular edges, but I want to give the option of putting
arrows on the edges. I am running into some issues with the Arrow
classes.

With my Text, Rectangle, and Line2D objects I can get and set their
locations with methods such as get_position(), get_x(), and get_xdata()
respectively. But there are no such methods for any of the Arrow
classes. (By the way, it seems like these sorts of things would be
in the base classes, and much more standard).

What is the difference between Arrow, YAArrow, and FancyArrow
anyway? (Besides drastically different scales).

Some other features of the Arrow class that I would like very much are:

  • double headed arrows (one line with an arrow head on each end)

  • the ability to turn the arrow head on and off easily (Boolean
    parameter function)

Does anyone have any ideas on how to work around these issues?

Thanks,

-Ben

I thought of a way to side step the problem. Is it possible to
have a Line2D object that only has a marker on one end?

···

From:
matplotlib-users-bounces@lists.sourceforge.net
[mailto:matplotlib-users-bounces@lists.sourceforge.net] On Behalf Of Ben Axelrod
Sent: Thursday, August 14, 2008
5:54 PM
To: Matplotlib
Subject: [Matplotlib-users] Arrow
Questions

I am trying to implement a dynamic graph in mpl, where users can drag
around the nodes, and the edges follow the nodes like rubber bands. I
have this working with regular edges, but I want to give the option of putting
arrows on the edges. I am running into some issues with the Arrow
classes.

With my Text, Rectangle, and Line2D objects I can get and set their
locations with methods such as get_position(), get_x(), and get_xdata()
respectively. But there are no such methods for any of the Arrow
classes. (By the way, it seems like these sorts of things would be
in the base classes, and much more standard).

What is the difference between Arrow, YAArrow, and FancyArrow
anyway? (Besides drastically different scales).

Some other features of the Arrow class that I would like very much are:

  • double headed arrows (one line with an arrow head on each end)

  • the ability to turn the arrow head on and off easily (Boolean
    parameter function)

Does anyone have any ideas on how to work around these issues?

Thanks,

-Ben