GraphViz sets the page width

I am using GraphViz to locate controls in my C # application.

But I cannot give the graphViz dot generator the output width.

These are the point file parameters that im using

Digraph x {
    autosize=false;
    size="25.7,8.3!";
    resolution=100;
    node [shape=rect];
    (edges definitions comes here)
     ...

      

But doesn't seem to affect the generated plaintext file.

Am I missing something to set the page width?

Hello

+3


source to share


1 answer


I added a -> b

to your example. Here's the plaintext output I get:

digraph x {
    graph [autosize=false, size="25.7,8.3!", resolution=100];
    node [label="\N", shape=rect];
    graph [bb="0,0,54,108"];
    a [pos="27,90", width=0.75, height=0.5];
    b [pos="27,18", width=0.75, height=0.5];
    a -> b [pos="e,27,36.104 27,71.697 27,63.983 27,54.712 27,46.112"];
}

      

As you can see, the attributes are size

and resolution

are included in the output.

You can change the values size

and resolution

it will not change anything other than these attributes in the plaintext output. The positions of all nodes and edges are relative to the bounding box ( bb

) of the graph.



However, if you choose, for example, to withdraw png, graphviz will use this information to scale the bounding box in accordance with your attributes size

and resolution

and calculating the target image size.

In this example, the resulting png will be 444 by 831 pixels (8.3 inches at 100 dpi yielding 830 pixels, the pixel on top is likely due to a rounding error).

Below you can find more detailed examples of attributes size

and resulting image size in this answer .

+6


source







All Articles