Graphvis/Manual
Contents
Working with the system
GraphVis3D system is designed as an applet and is run from command line terminal by running the command
jar gv.jar
The system has a main window and a navigation menu that provides access to uasable operations. You must first create a graph using the Edit menu (or the corresponding keyboard shortcuts), or load an already created graph (menu File-> Open, Ctrl + O) (Fig. 1).
From the File menu you can perform the following operations:
- New - creating a new graph to edit (hotkeys Ctrl + N). The current one will then be lost, so it must first be saved.
- Open (Ctrl + O) - open an existing column for editing. The graphs are saved in a special GML format (extension *. gml), described in a later section. When you select this menu item, the user will be prompted to select from the file system a description file of the graph.
- Save (Ctrl + S) - preservation of the graph in the format of GML. The exact structure of the edited graph is saved.
- Save As - to save (export) of a graph in one of the proposed formats (png, svg, pdf, dot). Exporting to image formats saves the view that the user sees at the moment in the application.
- Print (Ctrl + P) - sending a graph to print. Print options can be changed by the user.
- Exit - Exit the system.
The graph in the system is created and edited in three dimensions. A special feature is that the user can change the point of perspective. While doing this the external view of the graph changes, but not its structure or even the physical coordinates of the vertices in space.
Fig. 2(a) and Fig. 2(b) contain images of the same graph with different points of observation. Navigation in space can be done with the mouse or keyboard using the "hot" keys. Graph preview has two modes: view and edit mode. In the first case, the user can edit the elements of the graph, add new ones, but can change the point of observation. In the second, the contrary.
View menu provides the following functionality:
- Zoom, "Zoom in", "Zoom out", "100%", "Page Width", "local magnification" - control the scale of the image.
- Mode - switching between browsing and editing the graph.
- Graph Analysis - see more possibilities.
Editing the graph
The GraphVis3D system allows you to visualize the following graph elements: vertices, edges between vertices, the labels on vertices and edges. For images of vertices several geometric shapes are used. Point (sphere of minimum radius), cube (or an arbitrary rectangular box), cylinder, cone.
For each node type you can set and edit the size, color fill. These parameters are set separately for each vertex. Thus it is possible to create several types of vertices, visually similar to each other, but different text labels.
Edges (arcs) of a graph can be represented by one of the following: lines joining the vertices of a graph, broken line, defined by control points, smooth curves passing through a set of control points (for the three-dimensional splines are used). Options for type of arc, its color, thickness, the presence of the arrow (directed graphs) are edited for each vertex separately.
It is also possible to mass-edit system objects.
For simplicity and ease of editing, any system objects are edited by mouse, using the familiar drag & drop technology. Thus, it is possible, for example, to "drag" elements of the graph in space, create or delete control points on the edges, change the position of labels relative to their tops.
Label - a text description of the item count. In the described application, tags can be created for the vertices and edges. The label has a number of editable attributes: label text (possibly a numeric value), color, size, font. You can change the label position relative to its parent. Labels on the edges can be used to build weighted graphs.
Editing the graph by using the mouse (drag & drop), keyboard (with hot keys) or the Edit menu. From this menu I have available two important functions:
- Re-do (Ctrl + Y) - repeat the last undone operation.
- Undo (Ctrl + Z) - undo the last performed operation.
The system keeps track of all transactions that change the internal structure of the graph. With the help of these commands any erroneously executed command can undo the action (such as accidentally deleting an element of the graph). By default, the recorded history is the last 25 commands. This number can be changed while editing the current style (see Styles).
Fig. 3 illustrates some features of the system for editing the elements of the graph.
Working with graphs
Tools menu allows the user to perform various operations with the graph. First, the user can use the automatic graph generation module. Currently, the following types of graph generators are available: a tree (with the restriction on the number of vertices, minimum and maximum vertex degree, tree depth), three-dimensional grid (indicated by the mesh size in height, width and length), a random graph (indicated by the number of vertices of a graph and density - the ratio of the number of edges to the maximum possible number of edges), and some specialized graphs. Secondly, we have a set of utility operations with the graph: the construction of a normal directed graph, and conversely, the construction of complements of the graph, delete all reference points of the edges ("rectification" of edges). Thirdly, this menu provides access to a set of algorithms for automatic placement of graphs.
Processing the graph in GraphVis3D follows. The user selects the desired method of layout and runs it. The system sends the current graph to the processing module and start the process of laying-out the graph. The user can intervene in the process of constructing the image, change the parameters of the algorithm, interrupt the process at any step. Interim results of the algorithm are displayed in the form of animation or frame mode, depending on the algorithm. To date, the system implements the following methods of automatic styling of the graph:
- Random layout.
- Radial layout of graph on a circle (with the minimization of the number of crossings of edges).
- Laying the graph on the minimum grid (grid snap?). Nodes are arranged in the nodes of a three-dimensional grid.
- Kamada-Kawai command layout method.
- Fruhterman-Reinhold method.
- Scalable directive method. Designed to work with large graphs.
- Multidimensional scaling method.
An important feature is an application module that evaluates the quality of the image graph. With this module work with the system can go into semi-automatic mode. This mode is activated from the menu View-> Graph Analysis (Fig. 4).
Fig. 4:
From a user perspective, the process of image editing should look as follows. The user creates a graph with the correct structure to it. In parallel, the analysis of the graph takes place, that is, the calculation of metrics aesthetics. Metrics are described in detail in a previous chapter of the work. Metric values are displayed in an extra panel in the hundredths. For example, if a graph has a metric value equal to the folds on the edge of 0.98, this means that almost all edges are depicted by straight lines. At the same time, the metric orthogonality is 0.4, that is the image of the graph is weakly consistent with this metric. If you change the topology of the graph, metrics are automatically calculated. Thus, the user can see how its changes affect the image quality. As mentioned above, the plugin architecture makes it easy to expand the existing set of metrics.
Styles
A style is a set of object attributes that are available to the user in real-time (/at the present moment). A style contains information about your system configuration for each type of graph elements. Creation and editing of any object is based on the current style. The style also defines the parameters of the layout algorithms, and some system settings of the application. The program provides a standard set of styles that is used most often in the construction of graphs, but users can create and use their own styles. Styles are found through the menu style, described below.
- Current - choose the current style to work with the system. The selected style, a set of standard styles, and the 5 styles most recently used. When selecting the style item, it becomes the current style and a form opens to edit the style (Fig. 13).
- New (Ctrl + Shift + N) - create a new style in the system. Selecting this item opens a form editing style.
Fig. 5
Additional features
The system has several additional features that distinguish it from its analogues. Mass editing of objects. For this operation, you must first select a group of objects. This can be done with the mouse and the Edit menu (select all, invert selection, cancel the selection). Selected objects are marked in color. After that, editing objects continues in the usual way, but the result is applied to all elements of the group.
GML format support. GML - Graph Meta Language - is a file format for saving graphs. It consists of a language that describes the structural properties of a graph and a set of flexible extensions to preserve specific data. Unlike other graph formats, GML uses a standard syntax. It is based on the well-known XML language and is therefore ideal for all types of storage, including storage, processing, and storing descriptions of graphs. GML allows you to store a variety of graphs and properties of graphs, hypergraphs, hierarchical graphs, links to external objects that are specific attributes of the application. In the last decade, GML was, in fact, the common file format for storing graphs, so support for this language is important and necessary feature of any graph editor. GraphVis3D uses this format to save the graphs in the file system. Integration with other graph editors is implemented through the use of GML.
Rendering uses LOD technology (Level Of Detail). Each system object has multiple levels of detail. The level of detail that is applied to a particular object depends on the position of the object and the observer. The farther away the object is located from the observer, the lower the level of detail that is applied to it. If the subject is "off-screen" (ie, out of view of the observer), then the lowest level is applied to the object. This can significantly improve system performance, and lower CPU load. This factor is especially important in the visualization of graphs with many vertices or edges.