0

In this answer, there are edges with :e and :w in the code:

key:i1:e -> key2:i1:w

What do they mean? I suppose they are this line in The DOT Language | Graphviz:

compass_pt : (n | ne | e | se | s | sw | w | nw | c | _)

But I don't understand this. Googling compass_pt GraphViz doesn't yield any useful information.

Ooker
  • 1,969
  • 4
  • 28
  • 58
  • 1
    see: https://graphviz.org/doc/info/attrs.html#k:portPos – Luuk Jun 07 '21 at 17:53
  • 2
    Try running `digraph G { 1:e -> 2:w; 3->4; }` through webgraphviz.com and look at the generated graph. Now does it make sense? – Eric Lippert Jun 07 '21 at 17:54
  • 1
    @EricLippert I see. Anyway, FYI: [How does this (phishing) website has an identical domain with the authentic one?](https://webmasters.stackexchange.com/q/135675/52079) – Ooker Jun 07 '21 at 18:22
  • I am curious to know how that phishing site managed to poison search results as well! – Eric Lippert Jun 07 '21 at 18:33
  • I also checked and yeah the names are identical ASCII characters. DNS cache poisoning is my best guess but this is not my area of expertise where security is concerned. – Eric Lippert Jun 07 '21 at 18:44

1 Answers1

3

See https://www.graphviz.org/doc/info/attrs.html#k:portPos
Ports are used to explicitly position head/tail of edges. Ports are specified by compass points n(north), sw (southwest), etc and denote where on a node the edge is to terminate.

graph p {
 // node names (e.g. ne) are not Graphviz instructions, but are just for the reader
 n--P:n
 ne--P:ne
 nw--P:nw
 s--P:s
 se--P:se
 sw--P:sw
 w--P:w
 e--P:e
 c--P:c
 }

gives: enter image description here

sroush
  • 5,375
  • 2
  • 5
  • 11