Message Boards Message Boards

TreePlot. How to make it wider to avoid truncation of the vertex labels?

Posted 10 years ago

My first use of Mathematica is to draw a tree-graph. With few nodes it works. With many the labels are truncated. An example follows.

Can I widen the graph? Can I rotate it?

Here is the TreePlot:

list={"/proj/Test/dat"->"ABC.def","/proj/Test/dat"->"ABC.geo","/proj/Test/dat"->"ABC.inp",
"/proj/Test/dat"->"ABCExtractHist.inp","/proj/Test/dat"->"ABCHistory.dei",
"/proj/Test/dat"->"ABCln.DAT","/proj/Test/dat"->"ABCSeabed.dei",
"/proj/Test/dat"->"ABCXY.dat"}
TreePlot[list, VertexLabeling -> True (* , ImageSize -> 5 *) ]

Please forgive the bad reproduction of the lines. They are nicely formatted in a text editor running from the Windows command prompt --- apparently the system here do not recognize the end-of-line code.

To get a wider graph:

TreePlot[list, VertexLabeling -> True, AspectRatio -> 0.1, ImageSize -> {Automatic, 100}]

To get a rotated graph:

TreePlot[list, Left, VertexLabeling -> True]

The documentation for TreePlot may provide more useful options.

POSTED BY: Gerli Jõgeva
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract