| 1 |
\section{Using \smyrna} \label{sec:using} |
| 2 |
|
| 3 |
One starts \smyrna\ as with any program, either using a command interpreter to |
| 4 |
execute it or double-clicking on its icon. From the command line, |
| 5 |
it accepts a single argument giving the |
| 6 |
file name of a graph to be viewed. |
| 7 |
|
| 8 |
This will open a main window for \smyrna\ similar to |
| 9 |
that shown in Figure~\ref{fig:main0}. |
| 10 |
\begin{figure}[ht] |
| 11 |
\begin{center} |
| 12 |
\includegraphics[scale=.3]{figures/smyrna.png} |
| 13 |
\caption{\small Typical \smyrna\ view.} |
| 14 |
\label{fig:main0} |
| 15 |
\end{center} |
| 16 |
\end{figure} |
| 17 |
The window has a fairly typical layout. There is a menu bar across the top, |
| 18 |
with some additional widgets on the right side of it. There is a control bar |
| 19 |
of buttons down the left side. The remainder of the window is the display area. |
| 20 |
|
| 21 |
\subsection{Opening a graph} |
| 22 |
If no file name is given on the command line, one can use |
| 23 |
{\tt File->Open} to open a graph file. This can also be used |
| 24 |
read in additional graphs. When a new graph is read in, it is made |
| 25 |
the {\it active} graph, and the previous graph is added to the |
| 26 |
list of open graphs. One can make an open graph the new active |
| 27 |
graph by using the {\tt Active Graph} menu at the top right |
| 28 |
of the main window, picking the desired |
| 29 |
graph, and then clicking on the {\tt Activate} button. |
| 30 |
|
| 31 |
Being able to switch back and forth between open graphs can be |
| 32 |
useful when analyzing graphs. However, due to resource consumption, |
| 33 |
one should avoid having too many open graphs. You can close a |
| 34 |
graph the same way that you activate it, except clicking on the |
| 35 |
{\tt Remove} button rather than {\tt Activate}. |
| 36 |
|
| 37 |
\subsection{Navigation} |
| 38 |
To zoom in and out on a graph, you use the scroll wheel or ball |
| 39 |
on the mouse. Or you can use the plus and minus magnifying glasses |
| 40 |
\includegraphics{figures/zoomin.png} \includegraphics{figures/zoomout.png} |
| 41 |
on the left-hand icon bar. |
| 42 |
|
| 43 |
To pan, click and hold down the left mouse button, and move the |
| 44 |
mouse. Releasing the mouse stops the panning. |
| 45 |
|
| 46 |
Sometimes during navigation, you may find yourself in some obscure corner |
| 47 |
of the graph, or you've lost the graph entirely. By clicking on the top |
| 48 |
button |
| 49 |
\includegraphics{figures/center.png} |
| 50 |
on the left icon bar, the view is reset so that the graph is |
| 51 |
centered in the window, and just large enough |
| 52 |
to fill it. |
| 53 |
|
| 54 |
\subsection{Selection} |
| 55 |
{\it Smyrna} has a notion of selected nodes and edges. |
| 56 |
To pick a single node or edge, right click on it. The color will |
| 57 |
change to indicate the selection; in addition, an |
| 58 |
attribute of the object may be displayed. You can use the Labels |
| 59 |
tab (Section~\ref{subsubsec:labels}) to specify which attribute you wish to see. |
| 60 |
If right clicked a second time, the object is unselected. |
| 61 |
Multiple objects can be selected. |
| 62 |
|
| 63 |
One can also select multiple items by holding down the right mouse |
| 64 |
button and sweeping out a region. One can do this multiple times; |
| 65 |
the selected set is the union of all selections. |
| 66 |
What is selected is determined by the E and N buttons on the control bar, which |
| 67 |
activate the selection of edges and nodes respectively. Initially, only nodes |
| 68 |
can be selected. |
| 69 |
\begin{comment} |
| 70 |
\bf Can one unselect multiple nodes, but not all? |
| 71 |
\end{comment} |
| 72 |
|
| 73 |
The button |
| 74 |
\includegraphics{figures/pan.png} |
| 75 |
at the bottom of the control bar can be used to unselect everything. |
| 76 |
\begin{comment} |
| 77 |
Do we still want cluster selection? What does that do? |
| 78 |
Should one be able to unselect by sweeping? |
| 79 |
\end{comment} |
| 80 |
|
| 81 |
Choosing {\tt Edit->Node List} opens the Node List widget (Section~\ref{sec:nodelist}), |
| 82 |
which provides a text view of the selected nodes. It also provides the opportunity |
| 83 |
to save the selected nodes as a subgraph. |
| 84 |
|
| 85 |
\subsection{3D in \smyrna} |
| 86 |
\label{sec:3D} |
| 87 |
To move from a 2D to a 3D view, click the button \includegraphics{figures/3D.png} |
| 88 |
found in the control bar. Pan and zoom are achieved the same way they are in 2D. |
| 89 |
For rotation in 3D, hold down the left shift key, then click and hold |
| 90 |
down the left mouse button, and move the mouse. |
| 91 |
Returning back to 2D is done by clicking the control bar button |
| 92 |
\includegraphics{figures/2D.png}. |
| 93 |
|
| 94 |
\subsection{Graphical Node and Edge Attributes} |
| 95 |
To display more information about the graph, especially attributes |
| 96 |
that may be associated with nodes or edges, one can use various |
| 97 |
display attributes. The principal such attribute is color, stored |
| 98 |
as the {\tt color} attribute in a node or edge. The attribute can |
| 99 |
be set already when the graph is read in, or it can be attached |
| 100 |
using the Attribute tab or the Script tab of Settings widget. |
| 101 |
If the color is not explicitly set, \smyrna\ provides default values |
| 102 |
which can be set using the General tab of the Settings widget. |
| 103 |
|
| 104 |
For cluttered drawings, it can sometimes help to play down parts of the graph. |
| 105 |
\smyrna\ allows you turn off the drawing of either nodes are edges. There |
| 106 |
are check boxes for this also on the General tab. |
| 107 |
You can also reach a middle ground by having the edges or nodes drawn, but making |
| 108 |
them more transparent. To do this, one uses the Node Alpha and Edge Alpha sliders |
| 109 |
on the Graph tab. |
| 110 |
|
| 111 |
The Graph tab also provides a Node Size slider. With this, you can uniformly |
| 112 |
increase or decrease the size of the nodes. If Node Shape is set to Spherical, |
| 113 |
you can set the size attribute of nodes to get a variation in node sizes. |
| 114 |
The attribute is used as a scale factor, so a size less than 1 will cause a node |
| 115 |
to shrink relative to other nodes while a size greater than 1 will enlarge the node. |
| 116 |
|
| 117 |
For large graphs, lack of screen space means you usually want to see nodes drawn as small disks. |
| 118 |
This holds if Node Shape is set to either OpenGL dots or Spherical. The former is quicker to draw, |
| 119 |
but at present does not allow varying sizes among nodes. (The Custom shape is not implemented.) |
| 120 |
For smaller graphs with xdot attributes attached, \smyrna\ will use the xdot information to |
| 121 |
draw the nodes and edges. |
| 122 |
|
| 123 |
\subsubsection {Defining and setting attributes} |
| 124 |
Attributes can be defined and set in \smyrna\ using either the Attributes tab or \gvpr\ via the |
| 125 |
Script tab. For setting atttributes, the former works on the set of selected nodes. |
| 126 |
|
| 127 |
\subsection{General Graph Manipulation} |
| 128 |
\label{sec:gvpr} |
| 129 |
There are controls in \smyrna\ for the most common operations such as navigation, selection |
| 130 |
by mouse and simple attribute queries. For more complex selection criteria, and general |
| 131 |
analysis and manipulation of graphs, \smyrna\ is integrated with the \gvpr\ graph processor. |
| 132 |
The main interface to \gvpr\ is provided by the Script tab (Section~\ref{sec:gvprtab}), though |
| 133 |
\smyrna\ also uses \gvpr\ for various internal operations. |
| 134 |
|
| 135 |
To use \gvpr, you write a script in the \gvpr\ language, which is then applied against an input |
| 136 |
graph. With the language, you can specify operations to be performed when the graph is first scanned; |
| 137 |
operations to be performed when each node or edge is visited; and operations to be performed after |
| 138 |
all node and edge processing has been done. Node and edge statements can have a boolean guard; with |
| 139 |
this, the action is only performed if the guard is true. |
| 140 |
As a simple example, the script |
| 141 |
\begin{verbatim} |
| 142 |
N[color=="blue"]{selected="1"} |
| 143 |
\end{verbatim} |
| 144 |
causes \gvpr\ to mark all blue nodes as selected. |
| 145 |
|
| 146 |
Though \gvpr\ is primarily designed for working with graphs, it incorporates the C language |
| 147 |
expression model, and provides many general-purpose C-like functions such as {\tt printf} and file I/O, |
| 148 |
string manipulation functions, and associative arrays. A more complete discussion of the use of |
| 149 |
\gvpr\ is outside of the scope of this document. The reader is referred to the \gvpr\ man page for |
| 150 |
further information. |
| 151 |
|
| 152 |
\subsection{Topological Fisheye Views} |
| 153 |
\label{sec:topfish} |