-1
digraph G {
   "DUT0" [label="DUT0"];  "DUT1" [label="DUT1"];
   "DUT0" -> "DUT1"  [headlabel="1", taillabel="2"];
   "DUT1" -> "DUT1"  [taillabel="1", headlabel="3"];
}

I am using the below script in graphviz dotEditor to create my graph.

The script mentioned above creates below diagram.

enter image description here

My requirement is: Instead of creating a new taillabel(1) on node DUT1(Edge from 1-->3) , it should use the same existing one.

How can I achieve this? Please help, Thanks in advance.

Adding the resulting image which is required. enter image description here

albert
  • 8,285
  • 3
  • 19
  • 32
Om Gupta
  • 1
  • 1
  • Please read [Under what circumstances may I add “urgent” or other similar phrases to my question, in order to obtain faster answers?](//meta.stackoverflow.com/q/326569) - the summary is that this is not an ideal way to address volunteers, and is probably counterproductive to obtaining answers. Please refrain from adding this to your questions. – halfer Apr 26 '20 at 15:50
  • Could you rephrase your request. I've come up with multiple interpretations of what you are after. Specifically, are you trying to simplify your input or modify the resulting image? – sroush Apr 26 '20 at 17:30
  • Sure @sroush. I will try to explain it better. The node DUT1 , have a port 1 , which is connected to port 2 of DUT0 and port3 of its own. So instead of having a duplicate port 1 on DUT1, it should use the same port 1. what changes should i make in my dot script to achieve this. Adding the result image which i require in the original question. Thanks for the response. Regards, – Om Gupta Apr 27 '20 at 04:53

1 Answers1

0

Probably not possible, but maybe you should have a look at the node placements (based on wind directions, as you also indicate in your hand drawing) and leave one of the labels like:

digraph G {
  "DUT0" -> "DUT1" [headlabel="1", taillabel="2"];
  "DUT1":n -> "DUT1" [ headlabel="3"];
}

The result:

enter image description here

albert
  • 8,285
  • 3
  • 19
  • 32