Hi Mico, why not just use the deco.arrow style and add the pos=0.5 option?
If you take the example from http://pyx.sourceforge.net/examples/drawing/arrow.html which reads c.stroke(path.curve(0, 0, 0, 4, 2, 4, 3, 3), [style.linewidth.THICK, style.linestyle.dashed, color.rgb.blue, deco.earrow([deco.stroked([color.rgb.red, style.linejoin.round]), deco.filled([color.rgb.green])], size=1)]) then just replace the deco.earrow with deco.arrow and add the pos=0.5 option to the list of options c.stroke(path.curve(1, 0, 1, 4, 3, 4, 4, 3), [style.linewidth.THICK, style.linestyle.dashed, color.rgb.blue, deco.arrow([deco.stroked([color.rgb.red, style.linejoin.round]), deco.filled([color.rgb.green])], size=1, pos=0.5)]) HTW, bene Am Sonntag, den 10.08.2008, 18:47 +0200 schrieb Mico Filós: > Hi, > > I have a data file with the coordinates (x,y) of a trajectory, which I > would like to plot in the plane (x,y) (the phase plane). > To make clear that the path is a trajectory, I want to stroke an > arrowead at approximately half the arclength of the path > (for those familiar with asymptote, I want to reproduce the effect of > MidArrow. See, e.g., > http://piprim.tuxfamily.org/asymptote/generale/index.html#fig0031) > I wonder how to do that in PyX in a simple way. > > Thanks for your help! > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > PyX-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/pyx-user > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ PyX-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pyx-user
