14

Bug introduced in 7.0 or earlier and persisting through 13.1


Show @ Graph[{1 -> 2, 2 -> 3}, Frame -> True]
Normal @ %

enter image description here

Is this a pure bug, or have I missed something?


InputForms reveal that Disks are converted correctly while Arrows remain in GraphicsComplex form. Going with investigation further, I found that not all Arrows...

{#, Normal @ #} & @ Graphics[
    GraphicsComplex[
      {{0, 0}, {1., 0}, {2., 0}}, 
      {
        {Thickness@.05, Blue, Arrow[{{1, 2}, {2, 3}}, .03]},
        {Thickness@.01, Red, Arrow[{1, 2}, .03], Arrow[{2, 3}, .03]}
    }], 
    ImageSize -> 300
]

enter image description here

So, as we can see, "separate" arrows are converted correctly while those gathered under one Arrow are not...

Q is there any quick fix to convert Graph to normal form correctly?

V10.3.1 Win 10

Kuba
  • 136,707
  • 13
  • 279
  • 740

1 Answers1

10
Normal[# /. a : Arrow[{__List}, Except[_List]] :> Thread @ a]

gives a quick fix for these examples.

Simon Woods
  • 84,945
  • 8
  • 175
  • 324