Hello Giorgos,

On Tue, May 12, 2009 at 03:00:43PM +0200, Giorgos Logiotatidis wrote:
> I use pyx library to hack a python parser of a network map. I based my
> work on this [1] example. I 'm searching for a way to label the arcs
> connecting the nodes but I haven't managed to find anything since it's
> the first time I use pyx and looks really complicated. Does anyone know
> a way to do this?
In principal, you have (at least;-) two possibilities to label the arcs:
 a) you can apply a graph axis (see e.g.
   http://pyx.sourceforge.net/examples/axis/painter.html) to each arc,
   and then deactivate the numbers and only keep the title
 b) you place the label as an independent text in the vicinity of the
   arc.
I would propose the first way, e.g (changed from the example code):

from pyx import *

c = graph.axis.pathaxis(path.curve(0, 0, 3, 0, 1, 4, 4, 4),
        graph.axis.linear(parter=None, min=0, max=1,title="axis title"))
c.writeEPSfile("title")

By setting the parter to None, I avoid the ticks and keep only the axis
title which is automatically centered and rotated.


HTH,

Axel

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
PyX-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-user

Reply via email to