Debian Codegraph @

doc/smyrna/controls.tex

raw
1 \section{\smyrna\ Controls}
2 \label{sec:controls}
3
4 In this section, we describe the various controls making up
5 the \smyrna\ interface. Figure~\ref{fig:main} shows an example of
6 the main \smyrna\ display.
7
8 \begin{figure}[ht]
9 \begin{center}
10 \includegraphics[scale=.3]{figures/smyrna.png}
11 \caption{\small Typical \smyrna\ view.}
12 \label{fig:main}
13 \end{center}
14 \end{figure}
15
16
17 Across the top of the main window, there is a fairly standard menu bar.
18 The {\tt File} pull-down menus offers the choices {\bf Open}, {\bf Save},
19 {\bf Save As} and {\bf Quit}. These should be self-explanatory.
20 The {\tt View} menu allows you to make the console window a subwindow of the
21 main \smyrna\ window.
22 \begin{comment}
23 As open and hide are mutually exclusive, this menu should
24 be made dynamic, or the control should be done as a toggle.
25 \end{comment}
26 The {\tt View} menu also lets you open the Node List widget, which
27 gives information about the currently selected nodes.
28 This is considered in detail in Section~\ref{sec:nodelist}.
29 The {\tt Help} menu provides access to information about using \smyrna\ {\bf but at
30 present does nothing}.
31 %The {\tt Select} menu provides shortcuts for selecting and unselecting large parts
32 %of the the graph, such as all nodes.
33
34 The {\tt Edit} menu consists of two items: {\bf Smyrna Settings} and {\bf Attributes}.
35 The first activates the \smyrna\ Settings Widget described in
36 Section~\ref{sec:settings}. This widget provides access to the parameters controlling
37 \smyrna's behavior, as well as providing some high-level manipulation of the graph.
38 The second provides a short-hand access to the Attributes tab (Section~\ref{sec:attr})
39 of the Settings Widget.
40
41 On the right of the menu bar are controls for handling the loaded graphs.
42 The currently active graph is shown. The names of all available graphs are provided in the
43 associated pull-down menu. To switch between graphs, the user can pick another graph from
44 the menu, then click on the {\tt Activate} button. Alternatively, clicking on the {\tt Remove}
45 button closes the graph. {\bf This doesn't appear to work.}
46
47 The top buttons along the left of the main window serve as simple controls for
48 certain common actions.
49 \begin{description}
50 \item[\includegraphics{figures/center.png}]
51 The top button is used to re-center the display.
52 \item[\includegraphics{figures/zoomin.png} \includegraphics{figures/zoomout.png}]
53 The next two buttons allow you to zoom in and
54 out.
55 \item[\includegraphics{figures/details.png}]
56 The fourth top button is yet another shortcut for opening the
57 Attributes tab (Section~\ref{sec:attr}) in the Setting widget.
58 \end{description}
59
60 The bottom buttons are used to toggle between states in \smyrna.
61 \begin{description}
62 \item[E N]
63 The top two, E and N, determine whether edges and nodes are selected when doing
64 an area selection. Programmatic selection or single selection by mouse still works even
65 if these are unset.
66 \item[\includegraphics{figures/2D.png} \includegraphics{figures/3D.png}]
67 The buttons toggle between 2D and 3D display modes.
68 If the {\tt pos} attributes of the nodes has only two coordinates, the
69 z value is taken to be 0, and the graph appears in the XY plane.
70 \item[\includegraphics{figures/fisheye.png} \includegraphics{figures/no_fisheye.png}]
71 The fish buttons toggle between the normal and topological fisheye views (Section~\ref{sec:topfish}).
72 \item[\includegraphics{figures/pan.png}]
73 The last button unselects all selected objects.
74 \begin{comment}
75 This makes me feel this button should be at the top.
76 \end{comment}
77 \end{description}
78
79 \subsection{\smyrna\ Settings Widget}
80 \label{sec:settings}
81 This is the main control panel for controlling the display parameters in
82 \smyrna. It also provides two tabs for interacting with the graph: a high-level
83 interface for dealing with graph attributes, and a general-purpose interface
84 for applying \gvpr\ on the graph. We discuss each tab individually in
85 the following subsections.
86
87 Note that is necessary to click on the {\tt Apply} button to cause the changes to
88 take effect.
89 \begin{comment}
90 Why not make each change immediate?
91 \end{comment}
92
93 \subsubsection{General Settings}
94 \label{sec:general}
95 The General Settings tab is shown in Figure~\ref{fig:general}.
96 It provides control control over the default color schemes, and whether
97 or not nodes and edges are drawn or can be selected.
98 Clicking on one of the colors brings up a color selection widget that allows
99 you to modify the color.
100 \begin{figure}[ht]
101 \begin{center}
102 \includegraphics[scale=.5]{figures/general.png}
103 \caption{\small The General Settings tab.}
104 \label{fig:general}
105 \end{center}
106 \end{figure}
107 \begin{description}
108 \item[Background Color]
109 Specifies the background color of the window.
110 \item[Border Color]
111 Specifies the border color.
112 If enabled, \smyrna\ draws a rectangle about the graph to indicate its limits.
113 This attribute specifies what color is used.
114 \item[Grid Color] specifies the color of grid points.
115 If enabled, \smyrna\ draws an array of grid points behind the graph.
116 \item[Default Node Color] gives the color used to draw nodes, unless specified explicitly
117 in the input graph.
118 \item[Default Edge Color] gives the color used to draw edges, unless specified explicitly
119 in the input graph or a color theme is selected.
120 \item[Selected Node Color] specifies the color used for selected nodes.
121 \item[Selected Edge Color] specifies the color used for selected edges.
122 \end{description}
123
124 This tab also provides check boxes to enable or disable various properties.
125 These can be used to turn off the drawing of nodes, edges, the border or the grid.
126 In addition, the ability to select nodes or edges using the GUI can be disabled.
127
128 \smyrna\ provides a collection of color themes which can be selected using the {\tt Color Theme}
129 menu. This specifies a color theme used to color edges with no color attribute. Edge color
130 calculations are based on an edge's {\em len} attribute. A different edge attribute can
131 be specified using the {\tt Edge Attr. for Color} text box.
132 \begin{comment}
133 This doesn't appear to be
134 implemented yet? Also, how does one turn of the color themes, so that the default edge color
135 is used?
136 \end{comment}
137
138 The {\tt Show Edges} menu can be used to determine when edges are drawn. Normally, an edge
139 is drawn if any part of it appears within the view windows. Sometimes, for clarity or efficiency,
140 it is better to only draw those edges with at least one node with the view.
141
142 \subsubsection{Labels}
143 \label{subsubsec:labels}
144 The Labels tab is shown in Figure~\ref{fig:labels}.
145 This tab provides control over labels used in \smyrna.
146 \begin{figure}[ht]
147 \begin{center}
148 \includegraphics[scale=.5]{figures/labels.png}
149 \caption{\small The Labels tab.}
150 \label{fig:labels}
151 \end{center}
152 \end{figure}
153 The {\tt Font} menu can be used to set the face and standard size of the OpenGL font used to
154 display text labels.
155 The {\tt Default Node Label Color} and {\tt Default Edge Label Color} items can be used to
156 specify which colors are used for node and edge labels, respectively.
157
158 The user can tailor what attribute is used as the label for nodes and edges. This is done via
159 the {\tt Node Label Attribute} and {\tt Edge Label Attribute} text boxes. For example,
160 a graph representing Internet communication may benefit from using a node attribute such
161 as {\it IPaddress} or {\it hostname}. Note that,
162 by default, the label comes from the pseudo-attribute {\it name}. For nodes, this is the
163 name of the node; for edges, the name is constructed from the names of its head and tail nodes.
164 \begin{comment}
165 I wonder if label may be a better and more
166 appropriate default attribute to use, since if the graph has been processed, the label will be
167 node name. Also, when are labels shown?
168 \end{comment}
169
170 Labels are shown when an object is selected. In addition, if the Show Node Labels box is checked,
171 labels are displayed for all nodes whenever one zooms in close enough. Close enough is determined
172 by the Labeling Level widget. The smaller the number, the sooner labels appear as you zoom in.
173
174 \subsubsection{Graph}
175 The Graph tab is shown in Figure~\ref{fig:graph}.
176 With this tab, the user can affect more technical aspects of the graph view.
177 \begin{figure}[ht]
178 \begin{center}
179 \includegraphics[scale=.5]{figures/graph.png}
180 \caption{\small The Graph tab.}
181 \label{fig:graph}
182 \end{center}
183 \end{figure}
184 The {\tt Node Shape} menu allows the user to specify how nodes are drawn.
185 \begin{description}
186 \item[OpenGL dots] Nodes are drawn as filled circles as efficiently as possible. All nodes
187 will have the same size.
188 \item[Spherical] Nodes are drawn using OpenGL spheres. The advantage over OpenGL dots is that
189 each node can have its own size specified by the size attribute. The disadvantage is that it is not
190 as efficient.
191 \item[Custom] At present, the choice is not implemented.
192 \end{description}
193
194 This tab provides three sliders. The {\tt Node Alpha} and {\tt Edge Alpha}
195 sliders control the transparency of nodes and edges. Set to 1.0, the object is opaque;
196 set to 0, the object is invisible. A typical use would be to set the edge alpha to a small
197 value rather than to turn off edge drawing entirely. The edges would still be visible, but
198 would obscure the drawing as much.
199 These values are multiplied with any alpha valued supplied with an edge's or node's color.
200 The {\tt Node Size} slider can be used to uniformly
201 scale the node size. Note that the node sliders have no effect for custom nodes.
202
203 The {\tt Advanced Mode} and {\tt Anti-aliasing} check boxes toggle the advanced user mode
204 \begin{comment}
205 What does this mean?
206 \end{comment}
207 and the use of anti-aliasing.
208
209
210 \subsubsection{Magnifier Settings}
211 The Magnifiers tab is shown in Figure~\ref{fig:magnifier}.
212 This controls the magnifying glass parameters.
213 \begin{figure}[ht]
214 \begin{center}
215 \includegraphics[scale=.5]{figures/magnifier.png}
216 \caption{\small The Magnifiers tab.}
217 \label{fig:magnifier}
218 \end{center}
219 \end{figure}
220 The radius of the fisheye magnifier is specified using the {\tt Radius} field.
221 The {\tt Distortion} field allows you control the distortion in the lens. Larger distortion
222 causes greater magnification.
223 \begin{comment}
224 What do the width, height and Zoom X fields do, and why are their boxes so different in size?
225 \end{comment}
226
227
228 \subsubsection{Topfish Settings}
229 The Topfish tab is shown in Figure~\ref{fig:topfish}.
230 This allows you to specify the parameters associated with a topological fisheye view of the
231 graph as discussed in Section~\ref{sec:topfish}.
232 \begin{figure}[ht]
233 \begin{center}
234 \includegraphics[scale=.5]{figures/topfish.png}
235 \caption{\small The Topfish tab.}
236 \label{fig:topfish}
237 \end{center}
238 \end{figure}
239 The {\tt \# Of Fine Nodes} field allows the user to set the number of the fine nodes
240 The {Fine Node Label Attribute} indicates what node attribute is used to label fine nodes.
241 The {\tt Coarsening factor} and {\tt Distortion Factor} fields control some technical
242 parameters of the view; refer to the paper for more details.
243
244 There are six check boxes.
245 \begin{description}
246 \item[Dist 2 Limit] Distance to limit value of the algorithm {\bf What does this mean?}
247 \item[Animate] Toggles whether animation is used to handle the transition from an old focus to
248 a new focus. Although more expensive, animation helps to preserve the mental map of the graph.
249 \item[Label Fine Nodes] Indicates whether fine nodes are labeled.
250 \item[Color nodes] {\bf What does this do?}
251 \item[Label Coarse Nodes] {\bf What does this do?}
252 \item[Label Focus] Indicates whether the focus node is labeled. The focus node label is
253 displayed prominently whether or not the labeling of fine nodes is enabled.
254 \end{description}
255
256 The two {\tt Color extremes} widgets allow you to set the colors used for the finest
257 and coarsest nodes. Colors of intermediate nodes are interpolated between these two colors.
258
259 \subsubsection{Applying \gvpr}
260 \label{sec:gvprtab}
261 The Script tab is shown in Figure~\ref{fig:gvpr}.
262 This is the main control for using \gvpr\ scripts to manipulate the active graph
263 as discussed in Section~\ref{sec:gvpr}.
264 \begin{figure}[ht]
265 \begin{center}
266 \includegraphics[scale=.5]{figures/gvpr.png}
267 \caption{\small The \gvpr\ tab.}
268 \label{fig:gvpr}
269 \end{center}
270 \end{figure}
271 The top text window can be used to enter and edit a \gvpr\ script. By then clicking on
272 the {\tt Run gvpr} button, the script is run on the active graph. As usual, to update
273 smyrna's data structures, you will need to click the {\tt Apply} (or {\tt OK}) button,
274 and then click on the main \smyrna\ window to cause the the display to be refreshed.
275 \begin{comment}
276 Can this be avoided?
277 \end{comment}
278
279 By default, any changes are done directly to the active graph. Often, this is appropriate.
280 During exploratory data analysis, though, the user may wish to keep the original graph unaltered
281 in order to return to it later. Rather than trying to undo any changes made, it is simpler to
282 mark the {\tt Clone Current Graph} checkbox. In this case, a clone of the original graph is made.
283 Then, the \gvpr\ is applied to the cloned graph, which then becomes the new active graph. The
284 original graph can be retrieved using the {\tt Active Graph} menu at the top of the main
285 \smyrna\ window. The obvious drawbacks to this mode are that there is the extra time needed to
286 clone the graph, and the extra memory use for each copy.
287
288 A \gvpr\ script accepts arguments, which are available via the {\tt ARGV[]} array. Normally, these
289 would be provided on the command line. Here, the user can use the middle {\tt Arguments} text
290 window to supply these.
291
292 In addition to manipulating a graph, a \gvpr\ script can also perform I/O to a {\tt stdout} stream.
293 This output appears
294 in the console window, which is labeled {\tt Output}. The console window opened as part of the
295 main \smyrna\ window using the {\tt View} menu is another view of the same stream.
296
297 Finally, the {\tt Load} and {\tt Save} buttons support the re-use of \gvpr\ scripts.
298 Specifically, the {\tt Load} button can be used to read in a file, whose contents are stored
299 in the \gvpr\ script text window, overwriting any previously stored script. Conversely, the
300 {\tt Save} button can be used to write the contents of the script text window into a file
301 for later use.
302
303 \subsubsection{Setting Attributes}
304 \label{sec:attr}
305 Manipulating attributes is a common task when using \smyrna. Any such operations can be done
306 using \gvpr. However, it seems reasonable to support this activity with a simpler interface.
307 The purpose of the Attribute tab is to provide this interface, though it should be noted that
308 the actual work is done using \gvpr.
309
310 Figure~\ref{fig:attr1} shows the initial state when the Attributes tab is opened.
311 Note that the caption indicates that some collection of nodes and edges has been selected.
312 \begin{figure}[ht]
313 \begin{center}
314 \includegraphics[scale=.5]{figures/attr1.png}
315 \caption{\small The Attribute tab.}
316 \label{fig:attr1}
317 \end{center}
318 \end{figure}
319 To start, use the radio buttons to specify what type of
320 graph object you wish to work with. Then type in the attribute's name in the
321 {\tt Attribute Name} field. As you type, the tab interface changes dynamically in
322 response to your typing,
323 giving feedback concerning what it knows about available attributes. If what you have
324 typed is the prefix of a known attribute, all attributes with that prefix will appear
325 in a list below. In Figure~\ref{fig:attr2}, the character 's' causes the various
326 known node attributes starting with 's' to be shown.
327 \begin{figure}[ht]
328 \begin{center}
329 \includegraphics[scale=.5]{figures/attr2.png}
330 \caption{\small Typing in the Attribute tab.}
331 \label{fig:attr2}
332 \end{center}
333 \end{figure}
334
335 \begin{description}
336 \item[Searching and modifying attributes]
337 If the current text fully matches a known attribute,
338 the background color of the {\tt Attribute Name} field will appear in green.
339 In the example shown in Figure~\ref{fig:attr3}, the shape attribute has been
340 recognized and the default value is shown.
341 In addition, you will see three additional buttons: {\tt Apply}, {\tt Apply All} and {\tt Search}.
342
343 \begin{figure}[ht]
344 \begin{center}
345 \includegraphics[scale=.5]{figures/attr3.png}
346 \caption{\small A recognized attribute.}
347 \label{fig:attr3}
348 \end{center}
349 \end{figure}
350
351 The {\tt Apply} button is used to replace the attribute values of selected objects of the
352 specified object type. In our example, we have chosen the {\tt shape} attribute,
353 and have specified a value of {\tt box} in the Value field. If we then click the {\tt Apply},
354 \smyrna\ will set the shape value of all selected nodes to the given value.
355 Note that if no objects have been selected, the {\tt Apply} button will not be active.
356
357 The {\tt Apply All} button is identical to the {\tt Apply} button except that the
358 attribute change is performed on all objects, not just the selected ones.
359
360 The {\tt Search} button is used to select objects of the specified object type based on
361 attribute values specified by regular expressions.
362 For example, suppose that you have a network graph with IP addresses
363 attached to each node. You can type {\tt IP} in the attribute name box, {\tt 10.*} in the
364 value box, and click on the {\tt Search} button.
365 This will select all nodes whose IP address begins with {\tt 10.}. Regular expression
366 matching is, obviously, based on the regular expressions supported in \gvpr.
367
368 \item[Adding new attributes]
369 If, as you type, the attribute name is not currently set in the graph for the specified object type,
370 the Attribute Name field will be red and
371 a button with a plus sign ('+') will appear, as in Figure~\ref{fig:attr4}.
372 You can then type in a value into the {\tt Default Value} field, click on the '+' button and
373 the appropriate attribute will be created with the given default value, and all objects
374 of the given type that value for the attribute.
375 Here, we have specified a default
376 value of "yes" in the Default Value field. If we now click on the '+' button on the right,
377 \smyrna\ will create this new node attribute.
378
379 \end{description}
380
381 \begin{figure}[ht]
382 \begin{center}
383 \includegraphics[scale=.5]{figures/attr4.png}
384 \caption{\small An unknown attribute.}
385 \label{fig:attr4}
386 \end{center}
387 \end{figure}
388
389 \subsection{The Node List Widget}
390 \label{sec:nodelist}
391 It is often useful to be able to focus on certain nodes, and look at some of their associated attributes.
392 This can be done using \gvpr (\ref{sec:gvprtab}), but this type of query is important enough that \smyrna\
393 provides the special-purpose Node List widget. This is opened by using the {\tt Edit} menu.
394 Figure~\ref{fig:nodelist} shows a typical view of the widget. It lists all of the currently selected nodes.
395 Selection could have been down by clicking on the nodes, sweeping out a region, or via \gvpr.
396 \begin{figure}[ht]
397 \begin{center}
398 \includegraphics[scale=.35]{figures/nodelist.png}
399 \caption{\small The Node List widget.}
400 \label{fig:nodelist}
401 \end{center}
402 \end{figure}
403 The list always gives the names of the selected nodes. You can specify additional attributes to be
404 displayed by setting the graph's {\tt datacolumns} attribute, which is a comma-separated list of the
405 desired attribute names. Thus, in the example shown, the graph has {\tt datacolumns="category,customer"}.
406 To select new columns, just run \gvpr. For example, to switch the current two columns and add the
407 {\tt tier} attribute, you would run the \gvpr\ script
408 \begin{verbatim}
409 BEG_G{datacolumns="customer,category,tier"}
410 \end{verbatim}
411 Note that, at present, you will need to close and then re-open the Node List widget to get the new columns.
412
413 The widget provides four buttons that can sometimes be useful in this context. The subgraph may be
414 interesting enough that you wish to view it off-line. By clicking the {\tt Save} button, you can save
415 the nodes as a separate graph. The {\tt Save with Edges} button, the graph saved with the selected nodes
416 and all edges in the original graph between two selected nodes. The {\tt Hide All} button will make all of
417 the selected nodes invisible; the {\tt Show All} button makes them all visible.