pykello / racket-graphviz

Library to enable using graphviz in Racket programs
BSD 3-Clause "New" or "Revised" License
25 stars 3 forks source link

doublecircle, doubleoctagon and tripleoctagon shapes don't work as expected #8

Open peey opened 4 years ago

peey commented 4 years ago

Refer to graphviz official documentation on how they should look. This is how they look when I try to change shape of one of the examples in racket-graphviz documentation:

(define dg (make-digraph
   `(("Locked" #:shape "circle")
     ("Unlocked" #:shape "doublecircle")
     (edge ("Locked:n" "Locked:n") #:label "Push")
     (edge ("Locked" "Unlocked") #:label "Coin")
     (edge ("Unlocked" "Locked") #:label "Push")
     (edge ("Unlocked:n" "Unlocked:n") #:label "Coin")
     (same-rank "Locked" "Unlocked"))))
(digraph->pict dg)

image

This is what I see with doubleoctagon instead of doublecircle

image

And tripleoctagon looks similar.

Any idea what might be happening?

peey commented 4 years ago

Update: If I generate dot code using digraph->dot and put it through graphviz externally, the result is correct. So something might be wrong with conversion to pict.

digraph {
   splines=true
    Locked[label="Locked",shape="circle"]
    Unlocked[label="Unlocked",shape="tripleoctagon"]
    Locked:n -> Locked:n[label="Push"]
    Locked -> Unlocked[label="Coin"]
    Unlocked -> Locked[label="Push"]
    Unlocked:n -> Unlocked:n[label="Coin"]
    {
    rank=same
    ordering=out
    Locked
    Unlocked
    Locked -> Unlocked[style=invis]
    }
}

image

The digraph->dot and then dot->pict route produces the same incorrect result as in the original post.