• No results found

Temporarily Relocating Points

4.2 Main Graphics Model

4.4.3 Temporarily Relocating Points

Scatterplot and graph displays support interactive temporary relocation of single points (nodes for graphs) or of a group of selected points using the gestures illustrated in Fig- ure 4.13. Moving the points temporarily saves the new point coordinates to the states

xTemp and yTemp. The dimension ofxTemp andyTemp is either 0 or n. If xTemp oryTemp are not of length 0 then they are required to be of length n, and the scatterplot will dis- play those coordinates instead of the coordinates in x ory. Hence, xTempand yTemp are temporary as setting them to zero length (e.g. for a plot with handlep) with

l_ configure (p, xTemp =c(), yTemp =c ())

will cause the scatterplot to display the data stored in thexandyplot states.

In addition to using mouse motion gestures, one can also relocate data points with

Move Points

&

Ctrl

single point

& Ctrl

& Shift

selected points

Figure 4.13: Temporary relocating points on a scatterplot.

functions specifies the points that should be temporarily rearranged. The valid subset specifications forwhichare the same as for thewhichargument ofl_configure(explained inSubsection 4.3.1). The temporary rearrangement buttons on the inspector will move the selected points only.

Name Description Button on Inspector

l_move_halign horizontally align

l_move_valign vertically align

l_move_hdist horizontally distribute

l_move_vdist vertically distribute

l_move_grid arrange on a grid

l_move_jitter jitter points

l_move_reset reset toxandycoordinates

Table 4.3: Functions for temporarily moving points on scatterplot

When distributing points horizontally or vertically, their order remains the same. For example, when you distribute the point both horizontally and vertically, then the resulting scatterplot will be a plot of the y ranks versus the x ranks. The correlation on that plot will be Spearman’s rho. When arranging points on a grid, some of the spatial ordering is

preserved by first determining a grid size (i.e. a×b where aand b are the same or close numbers) and then by taking the asmallest values in the y direction and arrange them by theirx order in the first row, then repeat for the remaining points.

4.4.4

Inspectors

Table 4.4 lists all loon’s inspectors. In this section, we discuss the loon inspector, the worldview inspector and the layers inspector in detail.

Name Rcreator function

looninspector l_loon_inspector

Worldview Inspector l_worldview

Layers Inspector l_layers_inspector

Scatterplot Inspector l_plot_inspector

Scatterplot Analysis Inspector l_plot_inspector_analysis

Glyphs Inspector l_glyphs_inspector

Serialaxes Glyph Inspector l_glyphs_inspector_serialaxes Pointrange Glyph Inspector l_glyphs_inspector_pointrange

Text Glyph Inspector l_glyphs_inspector_text

Image Glyph Inspector l_glyphs_inspector_image

Histogram Inspector l_hist_inspector

Histogram Analysis Inspector l_hist_inspector_analysis Serialaxes (Analysis) Inspector l_serialaxes_inspector

Graph Inspector l_graph_inspector

Graph Analysis Inspector l_graph_inspector_analysis Graph Navigators Inspector l_graph_inspector_navigators

4.4.4.1 loon Inspector

Thelooninspector is the default inspector and shows a histogram, scatterplot, serialaxes or graph inspector, depending on which display received the last mouse gesture input or window focus event. To detach a display from theloon inspector one can set the display stateuseLoonInspectortoFALSE.

Thelooninspector is a singleton, that is, there can be only one instance of it. Closing the looninspector will result inloon creating a newloon inspector as soon as a display reporting to thelooninspector receives a mouse gesture input or window focus event.

All the other inspectors inTable 4.4are not singletons and not context specific. That is, they do not change their focus depending on which plot gets the last user input. Instead, they require that theiractivewidgetstate is set manually to the plot widget path name (i.e. plot handle).

4.4.4.2 Worldview

The worldview provides a view of all visual items on a display and adds visuals for the ranges of the data and for the area seen in the plot region. The worldview accepts a histogram, scatterplot or a graph display as itsactivewidget. Figure 4.14(a) shows the worldview for a scatterplot of Canadian city coordinates with the map of Canada layered and the focus on the British Columbia area.Figure 4.14(b)shows a perspective view of the composition of the worldview fromFigure 4.14(a). InFigure 4.14(b), the “world bounding” outline shows the bounding box of all visual items (i.e. layers and plot data), and the “data bounding” rectangle shows the bounding box of the plot data.

The aspect ratio of theactivewidgetdisplay is maintained in the worldview. For the scatterplot and graph displays, the point/node glyphs are always filled circles and thesize state is not mapped to the glyphs. In addition to panning with a left-mouse button drag, the worldview supports the same panning and zooming gestures as the activewidget display.

(a) Worldview (b) Perspective of worldview composition

Figure 4.14: Worldview inspector and its composition in perspective.

4.4.4.3 Analysis Inspectors

The histogram, scatterplot, serialaxes and graph displays have their own analysis inspec- tor. In general, the analysis inspector is composed of three sections: aPlot section with controls that can modify general plot options, a Select section with controls and actions for selecting points, and aModifysection that provides actions to modify certain plot states for the selected points.

4.4.4.4 Layers Inspector

Layers are visual items that can be added to displays. The layers inspector shows the label, type and id for each added layer. Figure 4.15 show a layers inspector for a scatterplot display with three added layers. The buttons below the treeview provide the following actions for the selected layer (from left to right): move the layer down, move the layer up, move the layer below its parent, move the layer into the group below the layer, show the layer, hide the layer, add a new group layer, expunge the selected layer, and scale to the layer. The last row provides a text entry and set button to change the label of the selected layer.

Figure 4.15: Layers inspector.