Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As far as I know this requires a little work-around; I will only do it in Graphviz DOT language. I give you the solution first, then provide some explanations of how you can extend it.</p> <p>This is the resulting figure:</p> <p><img src="https://www.plantuml.com/plantuml/png/fPJBJeGm58RtFaLbNKWlmqoCwM8kBdm6umBapD2a0e6geyPtjos5p3ZCWhevQTFpVMtANmvjrfGeqoq0-hv1w573AqLFNPar8Agw0goo79I8x0AY4MxgJaGiOPWcz3PwllSCkygm4uQSCVmgmqVc3iSauHvQ3q1U7_5BhUfMA7aeTQxU07VwKu7OIwMWy3GUmCqya68s7dGx3-Kdw6xchabgBZNryCDyc8pmZXZQzSZgNNOoLu3tyWX59xz0wDOeFcIXIq5m2TPg1lxAc9KC7yFRQA2DJjfOe8rFsdZmsUY4RH5i8nEsDDJcaa0lVCj_-CY4RnMQ4lEK-sTvBboZEBRPivNQkd53xkh2LfFgFiisnZxdTd5fQ_yViTFLCEKN_Lxl-hQNg_rUhgI3XFvf-_a5.png" alt="outfile.png"></p> <p>This is the Graphviz code producing the figure:</p> <pre><code>graph atree { Item1 [shape=none,label="Item 1",pos="2.2,1.1!"]; Item2 [shape=none,label="Item 2",pos="2.2,0.1!"]; Item3 [shape=none,label="Item 3",pos="2.9,-0.3!"]; A [shape=box,color=lightblue,style=filled,pos="2,3!"]; B [shape=box,color=lightblue,style=filled,pos="1,2.1!"]; C [shape=box,color=lightblue,style=filled,pos="3,2.1!"]; D [shape=box,color=lightblue,style=filled,pos="1.5,1.5!"]; E [shape=box,color=lightblue,style=filled,pos="1.5,0.5!"]; D0 [style=invisible,fixedsize=true,width=0,height=0,pos="2,2.5!",label=""]; D1 [style=invisible,fixedsize=true,width=0,height=0,pos="1,2.5!",label=""]; D2 [style=invisible,fixedsize=true,width=0,height=0,pos="3,2.5!",label=""]; D3 [style=invisible,fixedsize=true,width=0,height=0,pos="1,1.5!",label=""]; D4 [style=invisible,fixedsize=true,width=0,height=0,pos="1,0.5!",label=""]; D5 [style=invisible,fixedsize=true,width=0,height=0,pos="1.5,1.1!",label=""]; D6 [style=invisible,fixedsize=true,width=0,height=0,pos="1.5,0.1!",label=""]; D7 [style=invisible,fixedsize=true,width=0,height=0,pos="2.2,-0.3!",label=""]; A -- D0 -- D1 -- B -- D3 -- D4 -- E [color=blue]; E -- D6 -- Item2 -- D7 -- Item3 [color=blue]; D0 -- D2 -- C [color=blue]; D3 -- D -- D5 -- Item1 [color=blue]; } </code></pre> <p>If you put it in a file named <code>inputfile.dot</code> you can get the resulting image file by using the command <code>neato -Tpng inputfile.dot &gt; outfile.png</code>.</p> <p>Now a couple of comments on how it works: The code building the tree with <code>A, B, C, D, E, Item1, Item2, Item3</code> is straightforward (the attributes merely set the colors and box styles). The trick to get the lines straight and orthogonal consists of 1) adding invisible nodes with zero size to the graph, and 2) positioning all objects in absolute coordinates on the canvas. The auxiliary nodes <code>D1, D2, D3, D4, D5, D6, D7</code> are needed for step 1) and the <code>pos="x,y!"</code> options are needed for step 2). Note, that you need the <code>!</code> sign at the end of the <code>pos</code> command since otherwise the positions would not be considered final and the layout would still get changed.</p> <p>You can add additional nodes by first positioning a new node (by using the code for the nodes <code>A ... Item3</code> as a template), adding an invisible, auxiliary node (with <code>pos</code> such that all connections to and from it are orthogonal) and then adding the connection to the graph via <code>&lt;StartingNode&gt; -- &lt;AuxiliaryNode&gt; -- &lt;NewNode&gt;</code>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload