1

Fig-1 I have a java program which produces a graph with the following information:

1) Nodes (with name and coordinates) 2) Edges (with labels and end nodes) 3) Routes (as sequence of edges). These routes form parallel edges w.r.t. to the original or base-edge, and these are called route-edge. The base-edges must have labels but for the route-edges labels are optional.

I have tried with many examples and their variation but could not satisfy the requirement. At present, I am drawing these with PowerPoint drawing by hand which is attached, but I desperately need a script to do all these.

So, I request if someone can guide me in this regard to draw exact picture as attached in the figure. Thanking you,Fig2 regards, Dillip Fig3

  • Welcome to TeX.SX! It is not clear to me what you are asking. On the one hand, you ask for a script to draw these diagrams yet you give only one example. You could draw the graph above easily using tikz but it is not clear to me if this would answer your question. Can you please give more details and preferably a minimal working example if you are after a TeX solution. – Andrew Apr 13 '15 at 7:55
  • If bending the edges is an option, this, quiet possibly, is the answer to your problem. – Pouya Apr 13 '15 at 7:56
  • If one creates a path perpendicular to a line, then any line perpendicular to this path will be parallel to the original line. So the main question is what to do if these parallel lines do not actually intercept the border of the target node. – John Kormylo Apr 14 '15 at 16:46
  • Andrew, Pouya and John thank you so much for participating. @John, it is fine even if it does not touche the nodes. Now, I have added 3 examples of different type. The black lines are base-edges, and the coloured lines are route-edges. The objective is that the route-edges must be parallel to to the base-edge for that node pair. The might be 10 route-edges for a node pair. The routes are dynamically created by the Java program, so, I need a fully automated script which will draw this accordingly. It will be ideal if no line cross each other. Thanks & regards. – Dillip Rout Apr 15 '15 at 5:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.