Visual Query Interface
This section discusses the Visual Query interface of DEVise:
Introduction
In a database environment, users ask their questions by formulating
queries over the underlying database. The query output are the
answers to these questions. The same questions can be asked over and over
on different sets of input data. The same principle applies when graphics
is used to represent data. The difference is that visual queries are
formulated using a graphical user interface, against graphical data.
When formulating visual queries, users start with a set of input data.
Graphical representations of the input data are generated, perhaps
through extensive experimentations. Users would navigate the data to look for
places of interest. Sometimes users might need additional help by looking
at the original data represented by the graphics. The state
of the visualization environment forms a visual query. Just like
a database query, the visual query can be saved, and applied over and
over to different sets of input data.
A visual query is constructed by manipulating the system components
in DEVise to create component instances and interconnections. These
components are derived from a model of
visualization. The visual query interface manipulates these
components to allow the user to specify what data is to be visualized,
how data is to be visualized, and where to place the graphics on the
display.
Session
The state of each visual query is stored as a session. Sessions are
accessed from the Session menu, with the following menu items:
- Open: restore a previously saved visual query to its original state.
- Open as template: Apply a previously saved visual query to a different
set of input data. The user selects the new input data when session is
restored.
- Close: close current session.
- Save: save visual query to file, to be restored later.
- Save as: save visual query under a different name.
- Save as Template: save visual query as a template.
- Print: print contents of window or save as Postscript.
- Quit: quit DEVise.
How to represent data
The following commands are used to specify what the user wants
to visualize:
Define Mapping
The ``Visualize/Define'' command lets the user define new data
streams (TData) and new visualizations to the system. The steps
required to create a new visualization are summarized here:
- Select a data stream by pulling down the Source selector, or select
the Open... command at the bottom of the selector to define a new data
stream.
- Click on Auto... to run the automatic mapping utility.
- Select the attributes of visualization from the dialog box, including
the X attribute, one or more Y attributes, window name and layout, and
other options.
- Click on OK to create the new visualization.
Edit Mapping
The ``View/Edit Mapping'' menu command allows the user to experiment
with the mapping of a GData in the view. A dialog box appears,
allowing the user to edit the mapping. The dynamic nature of editing
the mapping is valuable during data exploration because the
effectiveness of graphics may vary for different locations in the
data, and for different zoom factors as well. The user can change all
attributes of the visualization, including the X, Y, color, shape,
size, pattern, and orientation attributes. Optional parameters, such
as shape width and height, can also be defined.
Controlling Shape Pixel Size
Sometimes the size of shapes are so small that they appear as single
pixels when drawn inside a view:
It is often desirable to accentuate these shapes by enlarging their
sizes to be bigger than a single pixel:
Controlling the actual size of pixel sized shapes is done via
keyboard commands directed at a view. The '+' key increases the
size of shapes, while the '-' key decreases the size of the shapes.
What to Visualize
There are many ways to specify what the user wants to look at:
Control Panel Widgets
The widgets on the control panel are mainly used for navigating the
data. The ``current view'' text widget
displays the name of the view that the user wishes to
navigate. User commands initiated from the control panel widgets are
applied to the current view. The user selects a view as the current
view by clicking inside its boundary with the left mouse button.
Interactions with widgets for navigation are translated into changing
the visual filter of the current view. The widgets used for navigation
are as follows:
- The arrow widgets are used to scroll left,
right, up, and down. The 4 widgets around the arrows are for zooming in
and out in the X or Y directions.
- The text widgets are used for
editing the new X and/or Y ranges. Clicking the `use' button
changes the view's visual filter. The `undo-edit' button is used to undo
the editing.
- The `back one' button goes back one step in the history of changes
to the current view's visual filter. Clicking `use' moves back one step,
while clicking `undo' cancels the change.
- Clicking the `history' widget brings up the history window.
Layout vs. Display Modes
DEVise has two modes of operation: layout and display modes. Users
toggle between these two modes by clicking the
button (when you're in layout mode, the button looks like this:
).
In layout mode, the user constructs mappings and views and
decides where to place views in windows without having the graphics
update in the window. The windows are eventually updated when the user
switches to display mode.
Putting DEVise into layout mode is a time saver when large amounts
of data are involved. Layout mode allows the user to construct a visual
query without waiting for the graphics to be updated. Otherwise, adding a
view in a window may cause all other views already in the same window,
together with linked views in other windows, to be updated simultaneously,
which may take a long time.
Axes
The user can turn the display of view axes on/off. This is done via
the ``View/Toggle X Axis'' and the ``View/Toggle Y Axis''
menu selections. You can toggle the display of axes for all views
in a window using the ``Window/Toggle X Axis'' and ``Window/Toggle Y Axis''
menu selections.
Mouse and Keyboard Events
The user can use the following mouse commands:
- Click anywhere in a view with the left button to select the view
as the current view.
- Click in a view with the middle button to query
the data that lies under the graphical object closest to the mouse
location.
- Draw a rectangle with the left mouse button pressed in a view to
zoom only in the X axis (best for bar graphs).
- Draw a rectangle with the right mouse button pressed in a view to
zoom in the X and Y axes (best for scatter plots).
The following keyboard commands are available:
- Press number 4, 6, 8, or 2 to scroll view left, right, up, or down.
Numbers correspond to arrows on a numeric keypad with NumLock on.
- Press number 7 or 9 to zoom in or out on a view in the X direction.
- Press number 1 or 3 to zoom in or out on a view in the Y direction.
- Press <escape> to bring the control panel to the top.
History Window
The history window is accessed by clicking the `history' button
on the control panel. A history of changes to the visual filter
of the current view are displayed.
Users can go back to places previously visited by clicking in a
history window entry, and then clicking the `use' button on the
control panel. Users can also mark or unmark places of interest by
clicking in the `mark' column of the history window. The marked
entries are preceded by an `*'. Because the history window has a
finite size, old history entries are replaced by new ones after the
size of the history window reaches it maximum. However, marked entries
are never replaced.
Visual Link
Visual links are used to link the axes of multiple views, so that
scrolling or zooming one synchronously scrolls or zooms all linked
views. The ``View/Link'' menu brings up a dialog box that allows the
user to select a link for the current view. The dialog box also allows
the user to create new links, and to examine views that belong to
existing links. The ``View/Unlink'' menu allows the user to dissociate
a view from a link.
Cursor
Click here for an example.
Cursors are used to display the boundaries of one view relative to
another. Clicking in the destination view moves the cursor to the
clicked region, at the same time changing the visual filter of the
source view. The cursor menu is used to access cursors:
- Create: creates a cursor.
- Delete: deletes a cursor.
- Set source: Set the source view for the cursor.
- Set destination: Set the destination view for the cursor.
Switch TData
As the user experiments with the mapping of a GData, and navigates
through scrolling or zooming, the user might come across a location of
interest in the data. there are cases where the user wants to see what
the same location looks like for a different set of input data. The is
accomplished through the ``View/Switch TData'' menu command. this is
a time save by eliminating the need to use the mapping definition again, when the only
difference is that a different input is being used.
Duplicate Window
Consider a window consisting of a set of linked views. As the user
navigates the views, he or she might come across a location of
interest. One way to save this location is to mark it in the history window. However, the user may also want to
compare two separate locations. This is most easily accomplished by
making a copy of the window so that the two may be placed side by side
for comparison. This is done by choosing the ``Window/Duplicate'' menu
command.
After duplicating the window, the user is provided with two
identical windows. The user can use the first window as a reference
point, while using the second window for further navigation to find
other places of interest.
Data Querying
As the user navigates the data, there might be places where
information about the records used to generate the graphics becomes
important for understanding. Pressing down on the middle button may be
used to query the data that underly the mouse. As a result, a pop-up
window appears, giving the user information about the data records,
including attribute names and values. (Click for an example) In the event that there is too much
information to fit in a pop-up window, the information is displayed
textually on the user's terminal.
Where to Place Graphics
Views and windows are the means through which the user decides to
place graphics. First, views can be removed from windows to reduce
clutter, or moved to other windows for side by side comparison with
other views. These functions are accessed through the ``Window/Remove
View'' and ``Window/Bring View Back'' menu selections. When placed
within the same window, the positions of views may also be swapped
using the ``Window/Swap Views'' menu.
Windows are responsible for arranging views inside their
boundaries. Different placement strategies may be
implemented. Currently, DEVise offers three window layouts:
tiled/automatic, vertical, and horizontal. In addition, DEVise relies
on the window manager of particular implementations for moving a
window to a different locations on the display, for changing the size
of a window, or for turning the window into an icon.
Command Summary
Menus
There are six groups of menus: Session, Tables, GraphData, View, Window,
and Help. We now describe each one in turn, beginning with the Session
menu. Recall that the state of each visual query
is a session. The session menu deals with
saving and restoring visual queries:
- Open: restore a previously saved visual query to its original state.
- Save: save session under the default name.
- Save as: save session under a different name.
- Close: close current session.
- Open as Template: Apply a previously saved visual query to a different
set of input data. The user selects the new input data when session is
restored.
- Save as Template: save visual query as a template.
- Save as Batch Script: save the current session as a batch script rather
than as a Tcl script.
- Export Template: save the current session with its data source
definitions and possibly the data itself.
- Merge Template:
- Delete Session: delete a session file.
- Add Replica:
- Remove Replica:
- Print: print contents of window or save as Postscript.
- Quit: quit DEVise.
The ``Tables'' Menu is used to manage data streams and define
visualizations. See here for more
information.
The ``Graph Data'' menu deals with the mapping and TData of the
currently-selected view.
- Edit Mapping:edit mapping for current view.
- Copy/Edit: duplicate the currently-selected view, possibly with
different TData and a different mapping.
- Switch TData: Apply the same mapping that
creates the current view to a different input data.
The ``View'' menu is used to operate on views. Most of the menu
items require that the current view be specified by clicking in the
view with the left mouse button. The menu items are:
- Toggle X Axis: toggle X axis display on/off.
- Toggle Y Axis: toggle Y axis display on/off.
- Foreground: set foreground (axes, title, etc.) color.
- Background: set background color.
- Title: set, edit, or delete view titles.
- Fonts: control title and axis fonts.
- Links: control visual links.
- Cursors: control cursors.
- Statistics: control statistics display (min/max/avg).
- Color Statistics:
- Kiviat Graph: control Kiviat graph displays.
- Dimensions:
- Color Override: allow overriding data color specified in mapping.
- 3D Query:
- Destroy: destroy the selected view.
The ``Window'' menu operates on windows:
- Toggle X Axis: toggle X axis display on/off.
- Toggle Y Axis: toggle Y axis display on/off.
- Foreground: set foreground (axes, title, etc.) color.
- Background: set background color.
- New: create a new window.
- Layout: change the layout of a window.
- Duplicate: Make a copy of current window.
- Stack Control: control stacks and piles.
- Swap Views: swap the positions of the last two views selected.
- Move View: Move current view to another window.
- Remove View: Remove current view from its window.
- Bring View Back: Bring back a view that was removed earlier.
- View List: see a list of the names of all views in the current window.
- Destroy: destroy an empty window.
- Help: Open up the help window to display online documentation.
- History: Open up the history window.
The ``Help'' menu is not very useful at the present time:
- Demo: as of now, this just opens the file select box to select a
session file.
- History: open up the query history window.
Widgets
The control panel widgets are as follows:
- mode button: toggle between layout and display modes.
Current View widget: displays the name of the current view.
- xlow, xhigh, ylow, and yhigh: Displays the boundaries
of the current view. The widgets may be edited.
- use: makes the edited xlow/xhigh/ylow/yhigh the new visual
filter for the current view.
- undo-edit: undo the editing of the xlow/xhigh/ylow/yhigh widgets.
- back one: move back to the previous visual filter by changing
xlow/xhigh/ylow/yhigh widgets. The user has to click `use' to
initiate the changes.
- history: bring up the history window.
- navigations buttons on the lower left: for scrolling
left, right, up, down, zoom in X, zoom in Y, zoom out X,
and zoom out Y.
The history window widgets are as follows:
- mark: toggles an entry between marked and unmarked state. In the
marked state, the entry is never thrown away as the history buffer
fills up.
- xlow/xhigh/ylow/yhigh: click here to transfer this
entry of the history window to the xlow/xhigh/ylow/yhigh
widgets on the control panel. Then Click `use' on the control panel to
go back to this history entry.
- close: close the history window.
Back to DEVise home page.