Number: 1344
Title: *.png and *.cmapx sometimes produce different outputs with dot
Submitter: Elliott
Date: Wed Apr 30 11:56:51 2008
Subsys: Dot
Version: 2.16
System: x86-Linux-Ubuntu 8.04
Severity: minor
Problem:
Using pygraphviz and django, I'm dynamically creating maps of the fiber in our company's datacenter. Each node (representing a device) has a URL to a detail page for that device, so I have to generate an image and put cmapx on top of it.

Most of the time it works fine, but sometimes, i'll get cases where the URLs will be far removed from where its corresponding node is on the graph, to the point where you have clickable regions out in the middle of nowhere and links on top of the nodes are nowhere to be found.

I don't know what commands were used, but I can say i'm using pygraphviz 3.5 and used the following commands in python to generate the graphs:


..
#generate graph to the point where it's graph.string() output is the same as the file I supplied
graph.layout(prog="dot")
graph.draw(format="png", path=image_path)
output=graph.draw(format="cmapx", path=None)
..

Input:
digraph network_map {
        graph [nodesep=".6",
                overlap=false
        ];
        "#1"     [URL="/network/view/device/29/",
                shape=box];
        "322C"   [URL="/network/view/device/2/",
                shape=box];
        "#1" -> "322C"   [color=black,
                weight=1];
        "322B"   [URL="/network/view/device/3/",
                shape=box];
        "#1" -> "322B"   [color=black,
                weight=1];
        "#2"     [URL="/network/view/device/33/",
                shape=box];
        "324A"   [URL="/network/view/device/4/",
                shape=box];
        "#2" -> "324A"   [color=navy,
                label="(3)",
                weight=3];
        "001A"   [URL="/network/view/device/19/",
                shape=box];
        Out      [URL="/map/graph/"];
        "001A" -> Out    [color=goldenrod,
                label="(15)",
                weight=15];
        "001B"   [URL="/network/view/device/23/",
                shape=box];
        "001B" -> Out    [color=darkgreen,
                label="(7)",
                weight=7];
        "001B" -> "001A"         [color=navy,
                label="(2)",
                weight=2];
        "001C"   [URL="/network/view/device/15/",
                shape=box];
        "001C" -> "001B"         [color=black,
                weight=1];
        "001C" -> Out    [color=goldenrod,
                label="(13)",
                weight=13];
        "001C" -> "001A"         [color=black,
                weight=1];
        "001D"   [URL="/network/view/device/6/",
                shape=box];
        "001D" -> "001A"         [color=goldenrod,
                label="(10)",
                weight=10];
        "001D" -> "001B"         [color=navy,
                label="(3)",
                weight=3];
        "001D" -> "001C"         [color=goldenrod,
                label="(13)",
                weight=13];
        "102B"   [URL="/network/view/device/13/",
                shape=box];
        "103H"   [URL="/network/view/device/12/",
                shape=box];
        "102B" -> "103H"         [color=darkgreen,
                label="(9)",
                weight=9];
        "103B"   [URL="/network/view/device/39/",
                shape=box];
        "114A"   [URL="/network/view/device/8/",
                shape=box];
        "103B" -> "114A"         [color=navy,
                label="(2)",
                weight=2];
        "103C"   [URL="/network/view/device/5/",
                shape=box];
        "103C" -> "114A"         [color=black,
                weight=1];
        "103C" -> "102B"         [color=darkgreen,
                label="(9)",
                weight=9];
        "103H" -> "001C"         [color=navy,
                label="(2)",
                weight=2];
        "103H" -> "001B"         [color=darkgreen,
                label="(5)",
                weight=5];
        "103H" -> "001A"         [color=navy,
                label="(2)",
                weight=2];
        "114A" -> "001D"         [color=darkgreen,
                label="(5)",
                weight=5];
        "321A"   [URL="/network/view/device/49/",
                shape=box];
        "321A" -> "001D"         [color=black,
                weight=1];
        "322B" -> "001D"         [color=goldenrod,
                label="(15)",
                weight=15];
        "322C" -> "001D"         [color=darkgreen,
                label="(5)",
                weight=5];
        "324A" -> "103C"         [color=goldenrod,
                label="(10)",
                weight=10];
        "324B"   [URL="/network/view/device/38/",
                shape=box];
        "324B" -> "103B"         [color=navy,
                label="(2)",
                weight=2];
        "t2-221sw"       [URL="/network/view/device/1/",
                shape=box];
        "t2-221sw" -> "114A"     [color=navy,
                label="(2)",
                weight=2];
        "t2-221sw" -> "322B"     [color=goldenrod,
                label="(14)",
                weight=14];
        "t2-221sw" -> "324B"     [color=navy,
                label="(2)",
                weight=2];
        "t2-221sw" -> "#2"       [color=navy,
                label="(3)",
                weight=3];
        "t2-221sw" -> "324A"     [color=darkgreen,
                label="(7)",
                weight=7];
        "t2-221sw" -> "321A"     [color=black,
                weight=1];
        "t2-221sw" -> "322C"     [color=navy,
                label="(4)",
                weight=4];
        "t2-221sw" -> "#1"       [color=navy,
                label="(2)",
                weight=2];
}
Comments: same as bug 1344
Owner: erg
Status: Fixed