]> granicus.if.org Git - graphviz/commitdiff
emitSearchGraph: show weights of search graph in labels
authorCosta Shulyupin <constantine.shulyupin@gmail.com>
Mon, 2 May 2022 03:18:08 +0000 (06:18 +0300)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 26 May 2022 02:05:57 +0000 (19:05 -0700)
Before this patch using `weight` as `len` contradicted
predefined coordinates and changed layout.

lib/ortho/ortho.c

index 025ef2629129be7b391659e4fb6d7e8ac7f92cda..9185f860466b80c05be7b711ba39c14ee2a7bb77 100644 (file)
@@ -1528,7 +1528,7 @@ emitSearchGraph (FILE* fp, sgraph* sg)
     }
     for (i = 0; i < sg->nedges; i++) {
        ep = sg->edges+i;
-       fprintf (fp, "  %d -- %d[len=\"%f\"]\n", ep->v1, ep->v2, ep->weight);
+       fprintf (fp, "  %d -- %d[label=\"%f\"]\n", ep->v1, ep->v2, ep->weight);
     }
     fputs ("}\n", fp);
 }