Difference between revisions of "Arranging nodes to make clear diagrams"

 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
[[Category:Analytica User Guide]]
 
[[Category:Analytica User Guide]]
<breadcrumbs>Analytica User Guide > Creating Lucid Influence Diagrams > {{PAGENAME}}</breadcrumbs>
+
<breadcrumbs>Analytica User Guide > Creating Lucid Influence Diagrams > {{PAGENAME}}</breadcrumbs></br>
  
 +
The  [[Diagram menu]] offers a rich set of options to help in arranging diagrams to be tidier and clearer.
  
'''Adjust node size''': If you have nodes of different sizes, you can make them more consistent by selecting '''Adjust size''' (''Ctrl+T'') from the '''Diagram '''menu.
+
__TOC__
  
Adjust size examines the node’s contents (its title and picture), font, where word wraps would occur, the the default minimum node size (as set on the '''Diagram Style... '''dialog), the current height and width, the edge alignments of others nodes also selected, containment relationships of nodes that grouped within text or picture nodes, locations of corners and edges relative to the grid (when '''Snap to grid '''is on), and aspect ratios, and makes tradeoffs between these considerations to select a good size for the selected node(s). When you select '''Adjust size '''several times in succession (or by press ''Ctrl+T ''multiple times), it cycles through different tradeoffs options, so if you don’t like the sizes selected at first, just press ''Ctrl+T ''several more times until you see an arrangement of node sizes that works well.
+
===Adjust node sizes ===
  
It often works good to select many nodes simultaneously, especially if your diagram contains inputs fields with left or right alignments, or fields that are grouped within text or picture nodes. With multiple nodes selected, '''Adjust size '''generally attempts to preserve containment and align- ment relationships.
+
The '''Adjust size'''  option tries to make node sizes more consistent using a range of criteria:
 +
# Select a set of nodes by dragging a rectangle around them, or press ''ctrl+a'' to select all nodes in the diagram.  
 +
# Select '''Adjust size''' from the [[Diagram menu]]  or press ''ctrl+T'' to adjust their sizes.
 +
# If you don't like its first attempt, try again by pressing ''ctrl+T'', and see if you like it better.
  
'''Adjust size '''uses utilizes these various criteria, and avoids silly word wrap boundaries, only when the diagram uses ''ClearType fonts''. This is the case for all models created in Analytica 4.4 or later.
+
'''Adjust size''' cycles through options with different trade-offs considering the nodes' title (and picture, if any), font, word wraps, the default node size (set on the [[Diagram Style dialog]]), current height and width, edge alignments, groupings for nodes within a text or picture node, the locations of corners and edges relative to the grid (when '''Snap to grid '''is on), and aspect ratios.
  
If you load a model created in Analytica 4.3 or earlier, you will need to enable ''ClearType fonts ''by selecting '''Set Diagram Style... '''on the '''Diagram '''menu with the top-level model diagram in focus. The '''ClearType fonts '''checkbox appears on that dialog only when you are editing a legacy model. When you turn ClearType fonts on for the first time, the font width and spacing changes slightly, which usually causes some nodes to word wrap in new, undesireable places. A good trick at that point is to select all nodes by pressing ''Ctrl+A'', then select '''Adjust size '''repeatedly until a satisfactory appearance is reached.
+
You can resize several nodes by the same amount simultaneously:
  
You can also resize several nodes by the same amount simultaneously by following these steps:
+
# Select the nodes to resize.
 +
# Resize one of the selected nodes by dragging one of its handles. It resizes all the other selected nodes similarly.
  
# Select the nodes to resize.
+
You can set several nodes to the same width, height, or size as the last node in a selected group of nodes -- the node with solid black selection handles. (Use ''shift+click'' on a node add it as the last node in the selection.)  Use the [[Diagram_menu#Make_Same_Size_submenu|Make Same Size submenu]] fromthe [[Diagram menu]], and select sub-option:
# Resize one of the selected nodes by dragging one of its handles. All other selected nodes are also resized.
 
  
Selected nodes can also be set to be the same width, height, or size. To set the size of selected nodes to be the same size use the '''Make Same Size '''submenu in the '''Diagram '''menu. The last node selected will be the only node with solid selection handles and is called ''the reference node''. The options are:
+
* '''Make Same Size Width ''' (Press Ctrl+=) — Set their width to be the same as the last node.
 +
* '''Make Same Size Height '''— Set their height to be the same as the last node..
 +
* '''Make Same Size Both ''' (Press =+=) — Set width and height to be the same as the last node..
  
* '''Make Same Size Width '''— Sets all the selected nodes to the width of the reference node.
+
=== Snap to the diagram grid ===
* '''Make Same Size Height '''— Sets all the selected nodes to the height of the reference node.
 
* '''Make Same Size Both '''— Sets all the selected nodes to the width and height of the reference node.
 
  
'''Align to the grid''': It usually looks best when the centers of the nodes are aligned along a common horizontal or vertical line, so that many arrows are exactly horizontal or vertical. The square grid of 9x9 pixel blocks underlying each diagram makes this easy. When the grid is on (the default), each node that you create or move is centered on a grid intersection. This default makes it easier for you to position nodes so that arrows are exactly horizontal or vertical when nodes are aligned vertically or horizontally.
+
In Edit mode, diagrams show a 64 x 64 pixel grid.  With '''Snap to grid''' (the default), each node snaps to have its center and corners on an
 +
8x8 pixel grid (the dots on the 64x64 grid), whenever you add, move, or resize a node by dragging its corner box, or move node(s) using an arrow key. This helps you keep nodes aligned and with uniform sizes. It makes it easier to align nodes and arrows horizontally or vertically:
 +
:[[File:Chapter6 6.png]]
  
To turn the grid off in edit mode, uncheck '''Snap to Grid '''from the '''Diagram '''menu. When the grid is off in edit mode, the grid is still visible, and you can move the nodes pixel by pixel.
+
If you want to do finer arrangements or sizing by single pixel increments, you can ignore the grid even with '''Snap to grid''' on,  by  pressing the ''shift'' key as you drag a node, node corner, or move it with an arrow key.
  
:[[File:Chapter6 6.png]]
+
To turn off the snap to grid off in edit mode
 +
* Uncheck '''Snap to Grid '''from the [[Diagram menu]].
 +
The grid still appears in edit mode, but you can now position and resize nodes a pixel at a time.  When snap-to-grid is off, you can temporarily apply it when dragging a node or its corner, or using an arrow key, by pressing the ''shift'' key -- which has the opposite effect in this mode.
  
If nodes are not centered on a grid point, re-center them by following these steps:
+
To recenter nodes that are not on the grid:
  
# Select all nodes in the diagram with the '''Select All '''(''Control+a'') command from the '''Edit '''menu.
+
# Select all nodes in the diagram with the '''Select All '''(''Control+a'') command from the [[Edit menu]].
# Select '''Align Selection To Grid '''from the '''Diagram '''menu (''Control+j'').
+
# Select '''Align Selection To Grid '''from the [[Diagram menu]] (''Control+j'').
  
'''Align selected nodes''': To line up selected nodes with each other, use the '''Align '''submenu in the '''Diagram '''menu. You can align selected nodes in the following ways:
+
===Align nodes===
  
* Align the left edges.
+
Use the [[Diagram_menu#Align_submenu|Align submenu]] from [[Diagram menu]] align selected nodes. In each case, it aligns the selected nodes with the last selected node (shown with black corners). You can align nodes horizontally, on their left sides, centers, right sides, or both left and right sides:
* Align the centers left and right — this aligns the centers horizontally.
 
* Align the right edges.
 
* Align the left and right edges — this makes all the selected nodes the same width and aligns them so that their left and right edges match up.
 
  
 
:[[File:Chapter6 7.png]]
 
:[[File:Chapter6 7.png]]
  
* Align the top edges.
+
Or you can align them vertically, along their top sides, centers, bottom sides, or both top and bottom sides:
* Align the centers up and down — this aligns the nodes so that their centers are at the same vertical height.
 
* Align the bottom edges.
 
  
 
:[[File:Chapter6 8.png]]
 
:[[File:Chapter6 8.png]]
  
'''Distributing nodes''': To distribute selected nodes evenly, use the '''Space Evenly '''submenu in the '''Diagram '''menu. You can distribute selected nodes so that the centers are evenly spaced vertically ('''Space Evenly '''&rarr; '''Across''') or horizontally ('''Space Evenly '''&rarr; '''Down'''). To ensure that the nodes end up on the grid, use '''Space Evenly '''&rarr; '''Across, on grid '''and '''Space Evenly '''&rarr; '''Down, on grid'''. The “on grid” variations may change the begin-to-end span of the nodes, while the non-on-grid variants pre- serve the span but may place nodes off grid.
+
===Distribute nodes evenly===
 +
 
 +
To distribute selected nodes evenly, use the [[Diagram_menu#Space_Evenly_submenu|Space Evenly submenu]] in the [[Diagram menu]]. You can distribute selected nodes so that the centers are evenly spaced vertically ('''Space Evenly '''&rarr; '''Across''') or horizontally ('''Space Evenly '''&rarr; '''Down'''). To ensure that the nodes end up on the grid, use '''Space Evenly '''&rarr; '''Across, on grid ''' or '''Space Evenly '''&rarr; '''Down, on grid'''. The “on grid” options may adjust the locations of the first and last nodes as well as those in between. The non-on-grid options preserve the locations of the first and last nodes, but some of the nodes may be off grid.
 +
 
 +
===Choose which node is in front===
 +
 
 +
By default, text and picture nodes are behind influence arrows, and arrows are behind all other types of nodes (decision, chance, variable, etc.). If nodes overlap, the more recently created node is in front of the older node. You can change this order by selecting a node(s) and using the '''Send to Back '''and '''Bring to Front '''options from the [[Right mouse button menus|right-click menu]].
  
'''Choosing which node is in front''': By default, text and picture nodes are behind arrows, and arrows are behind all other types of nodes (decision, chance, variable, etc.). If nodes overlap, the more recently created node is on top of the older node. You can change this order by selecting a node(s) and using the '''Send to Back '''and '''Bring to Front '''options from the right-click menu.
+
===Hide less important arrows===
  
'''Hide less important arrows''': Sometimes so many nodes are interrelated that it is hard or impossible to arrange a diagram to avoid arrows crossing each other or crossing nodes. It might be helpful to hide some arrows that show less important linkages. For example, indexes and functions are often connected to many other variables; that’s why arrows to and from them are switched off by default.
+
Sometimes so many nodes are interrelated that it is hard or impossible to arrange a diagram to avoid arrows crossing each other or crossing nodes. It may be helpful to hide some arrows that show less important influences. For example, indexes and functions are often connected to many other variables: that’s why arrows to and from them are switched off by default.
  
You can hide all of the arrows linking indexes, functions, or modules, or the grayed feedback arrows in dynamic models, using the '''Set Diagram Style '''command from the '''Diagram '''menu in the [[Diagram Style dialog]]. You can also hide the input or output arrows from each node individually, using the '''Set Node Style '''command in the [[Node Style dialog]].
+
You can hide all of the arrows linking indexes, functions, or modules, or the grayed feedback arrows in [[dynamic]] models, using the '''Set Diagram Style '''command from the [[Diagram menu]] in the [[Diagram Style dialog]]. You can also hide the input or output arrows from each node individually, using the '''Set Node Style '''command in the [[Node Style dialog]].
  
'''Keep diagrams compact''': Screen space is valuable. To save space, keep nodes close together, leaving enough space between them for the arrows to be visible.
+
===  Update old models from Analytica 4.3 or earlier ===
  
When first creating a diagram, use plenty of space. Your diagram window can be as large as your monitor screen. Using this space, first find a clear arrangement, which minimizes arrow crossing and avoids node overlaps. Then, you can usually make the diagram more compact by moving the nodes closer together and moving the entire diagram closer to the upper-left corner of the win- dow. Finally, you can reduce the window size to fit the diagram.
+
Model created in Analytica 4.3 or earlier didn't use the modern ''ClearType'' fonts, which gives clearer text in diagrams. To update them to use ''ClearType'':
 +
# Show the diagram for the top level Model as the active window
 +
# Select '''Set Diagram Style... '''on the [[Diagram menu]]
 +
# Click the '''ClearType fonts '''checkbox in that dialog (it only appears if you are editing an old model).  
 +
When you turn ClearType fonts on for the first time, the font width and spacing changes slightly, which often causes some nodes to word wrap in new, undesirable places. To fix this:
 +
# Select all nodes in the Diagram by pressing ''Ctrl+A''
 +
# Select '''Adjust size''' from the '''Diagram''' menu. If it doesn't look quite the way you want, repeat until it does.
 +
You may repeat this for each Diagram in the model.
  
 
:[[File:Chapter6 9.png]]
 
:[[File:Chapter6 9.png]]
  
 
==See Also==
 
==See Also==
 +
* [[Selecting nodes]]
 +
* [[Create and edit nodes]]
 +
* [[Diagram menu]]
 
* [[Diagram window]]
 
* [[Diagram window]]
 
* [[Diagram Style dialog]]
 
* [[Diagram Style dialog]]

Latest revision as of 19:55, 16 January 2020


The Diagram menu offers a rich set of options to help in arranging diagrams to be tidier and clearer.

Adjust node sizes

The Adjust size option tries to make node sizes more consistent using a range of criteria:

  1. Select a set of nodes by dragging a rectangle around them, or press ctrl+a to select all nodes in the diagram.
  2. Select Adjust size from the Diagram menu or press ctrl+T to adjust their sizes.
  3. If you don't like its first attempt, try again by pressing ctrl+T, and see if you like it better.

Adjust size cycles through options with different trade-offs considering the nodes' title (and picture, if any), font, word wraps, the default node size (set on the Diagram Style dialog), current height and width, edge alignments, groupings for nodes within a text or picture node, the locations of corners and edges relative to the grid (when Snap to grid is on), and aspect ratios.

You can resize several nodes by the same amount simultaneously:

  1. Select the nodes to resize.
  2. Resize one of the selected nodes by dragging one of its handles. It resizes all the other selected nodes similarly.

You can set several nodes to the same width, height, or size as the last node in a selected group of nodes -- the node with solid black selection handles. (Use shift+click on a node add it as the last node in the selection.) Use the Make Same Size submenu fromthe Diagram menu, and select sub-option:

  • Make Same Size Width (Press Ctrl+=) — Set their width to be the same as the last node.
  • Make Same Size Height — Set their height to be the same as the last node..
  • Make Same Size Both (Press =+=) — Set width and height to be the same as the last node..

Snap to the diagram grid

In Edit mode, diagrams show a 64 x 64 pixel grid. With Snap to grid (the default), each node snaps to have its center and corners on an 8x8 pixel grid (the dots on the 64x64 grid), whenever you add, move, or resize a node by dragging its corner box, or move node(s) using an arrow key. This helps you keep nodes aligned and with uniform sizes. It makes it easier to align nodes and arrows horizontally or vertically:

Chapter6 6.png

If you want to do finer arrangements or sizing by single pixel increments, you can ignore the grid even with Snap to grid on, by pressing the shift key as you drag a node, node corner, or move it with an arrow key.

To turn off the snap to grid off in edit mode

The grid still appears in edit mode, but you can now position and resize nodes a pixel at a time. When snap-to-grid is off, you can temporarily apply it when dragging a node or its corner, or using an arrow key, by pressing the shift key -- which has the opposite effect in this mode.

To recenter nodes that are not on the grid:

  1. Select all nodes in the diagram with the Select All (Control+a) command from the Edit menu.
  2. Select Align Selection To Grid from the Diagram menu (Control+j).

Align nodes

Use the Align submenu from Diagram menu align selected nodes. In each case, it aligns the selected nodes with the last selected node (shown with black corners). You can align nodes horizontally, on their left sides, centers, right sides, or both left and right sides:

Chapter6 7.png

Or you can align them vertically, along their top sides, centers, bottom sides, or both top and bottom sides:

Chapter6 8.png

Distribute nodes evenly

To distribute selected nodes evenly, use the Space Evenly submenu in the Diagram menu. You can distribute selected nodes so that the centers are evenly spaced vertically (Space Evenly Across) or horizontally (Space Evenly Down). To ensure that the nodes end up on the grid, use Space Evenly Across, on grid or Space Evenly Down, on grid. The “on grid” options may adjust the locations of the first and last nodes as well as those in between. The non-on-grid options preserve the locations of the first and last nodes, but some of the nodes may be off grid.

Choose which node is in front

By default, text and picture nodes are behind influence arrows, and arrows are behind all other types of nodes (decision, chance, variable, etc.). If nodes overlap, the more recently created node is in front of the older node. You can change this order by selecting a node(s) and using the Send to Back and Bring to Front options from the right-click menu.

Hide less important arrows

Sometimes so many nodes are interrelated that it is hard or impossible to arrange a diagram to avoid arrows crossing each other or crossing nodes. It may be helpful to hide some arrows that show less important influences. For example, indexes and functions are often connected to many other variables: that’s why arrows to and from them are switched off by default.

You can hide all of the arrows linking indexes, functions, or modules, or the grayed feedback arrows in dynamic models, using the Set Diagram Style command from the Diagram menu in the Diagram Style dialog. You can also hide the input or output arrows from each node individually, using the Set Node Style command in the Node Style dialog.

Update old models from Analytica 4.3 or earlier

Model created in Analytica 4.3 or earlier didn't use the modern ClearType fonts, which gives clearer text in diagrams. To update them to use ClearType:

  1. Show the diagram for the top level Model as the active window
  2. Select Set Diagram Style... on the Diagram menu
  3. Click the ClearType fonts checkbox in that dialog (it only appears if you are editing an old model).

When you turn ClearType fonts on for the first time, the font width and spacing changes slightly, which often causes some nodes to word wrap in new, undesirable places. To fix this:

  1. Select all nodes in the Diagram by pressing Ctrl+A
  2. Select Adjust size from the Diagram menu. If it doesn't look quite the way you want, repeat until it does.

You may repeat this for each Diagram in the model.

Chapter6 9.png

See Also


Comments


You are not allowed to post comments.