Dot's trangles

We have a question regarding how dot treats the height and width fields of triangles. In particular when dot lays out a triangle (input.dot) it claims the dimensions are: width="0.75", height="0.68889" which is a width/height ratio of roughly 1.09. (See output.dot). When we ask dot to draw this triangle dot -Tpng output.dot -o output.png We see a triangle (output.png) that is 74 x 51, i.e. has a width to height ratio of roughly 1.45. How are we to interpret dot's width and height measurements so that our shapes coincide? This is particularly crucial when we draw edges from triangles.

input.dot digraph temp { graph [rankdir=TB]; node [label="\N"]; node1 [label=" ", shape=triangle, style=filled, fillcolor="0.75 0.8 1.0", color="0.0 0.0 0.0"]; }

 

ouput.dot digraph temp { graph [rankdir=TB]; node [label="\N"]; graph [bb="0,0,54,50"]; node1 [label=" ", shape=triangle, style=filled, fillcolor="0.75 0.8 1.0", color="0.0 0.0 0.0", pos="27,25", width="0.75", height="0.68889"]; }

AttachmentSize
output.png1.83 KB

Recent comments