Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

21
  • $\begingroup$ Very very nice...Now I will try to digest your heavy code. Thanks a lot. $\endgroup$ Commented Nov 24, 2019 at 0:51
  • $\begingroup$ When we combine two separate graphs, I lose track of the information on the edges that are present in both graphs. Would it possible to indicate with dashed lines those edges appearing in both graphs at the same time? $\endgroup$ Commented Nov 24, 2019 at 12:25
  • 1
    $\begingroup$ @TugrulTemel, re "edges appearing in both graphs", you can use complement = Complement[ EdgeList@grph[Transpose@mat, .25, "A", EdgeStyle -> Red], EdgeList@grph[mat, .25, "A"]]; intersection = Intersection[ EdgeList@grph[Transpose@mat, .25, "A", EdgeStyle -> Red], EdgeList@grph[mat, .25, "A"]]; SetProperty[EdgeAdd[grph[mat, .25, "A"], edgeadd], EdgeStyle -> {_ :> Blue, Alternatives @@ intersection -> Dashed, Alternatives @@ complement -> Red}]. Re direction of the edge b/w "C" and "B", it is more likely that I missed/misunderstood something. $\endgroup$ Commented Nov 24, 2019 at 13:39
  • 1
    $\begingroup$ @Tugrul, maybe you can try vc = Thread[vertices -> GraphEmbedding[GridGraph[{4, 5}]]][[;;Length[vertices]]]? $\endgroup$ Commented Nov 28, 2019 at 0:33
  • 1
    $\begingroup$ I had a misplaced ]; the correct form is vc = Thread[vertices -> GraphEmbedding[GridGraph[{4, 5}]][[;; Length[vertices]]]]. $\endgroup$ Commented Nov 28, 2019 at 23:54