Exploring Graphs with Elixir:

Title: Exploring Graphs With Elixir B4 - Native graph serialization not working? (51)

I’m working through the section on visualizing graphs. I was able to generate the png of the H2O graph where the two copies of the H molecule are superimposed on each other.

I tried to implement the patch, but the serialization doesn’t appear to be taking effect. According to the book, I should be getting

strict graph {
"o" [label="O"]
"h1" [label="H"]
"h2" [label="H"]
"h1" -- "o" [weight=1]
"h2" -- "o" [weight=1]
}

but I’m still getting

strict graph {
"O"
"H"
"H"
"H" -- "O" [weight=1]
"H" -- "O" [weight=1]
}

as in the first attempt.

I copied the code for the NativeGraph.Serializer and NativeGraph.Serializers.DOT to the respective places in my copy of the code. Is there something else I need to do?