ng_2d: Visualization instruction for 2d scatterplots on a tk2d...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/Viz2D_tk2d.R

Description

Visualization instruction for a navGraph session that link the nodes of a navigation graph to 2d scatterplots and the edges to a 3d rigid rotation or a 4d transition.

The scatterplots will be displayed on a tk2d display, provided by the RnavGraph package. tk2d allows the user to display dots, glyphs, text and images at given x-y positions. Further interactivity such as selection, zooming, brushing, changing colors and changing sizes are provided by the tk2d display. tk2d displays can also link data between different navGraph sessions.

Usage

1
ng_2d(data, graph, images = NULL, glyphs = NULL)

Arguments

data

NG_data object.

graph

NG_graph object.

images

NG_image object. Order of the images must match the order of the data in the NG_data object.

glyphs

Vector of character strings matching either the names or shortnames of the NG_data object.

Details

The text labels in the tk2d display are taken from the labels slot in the NG_data object.

It the group slot of the NG_data object contains only colors from the colors function, objects get colored accordingly. Otherwise the group data gets mapped to some color key.

Value

NG_Viztk2d object that inherits from the NG_Visualization class.

Author(s)

Adrian Waddell and R. Wayne Oldford

See Also

navGraph, ng_data, ng_graph, ng_image_array_gray, ng_image_files, ng_get-methods, ng_set-methods, ng_2d_myplot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## NG_data
ng.iris <- ng_data(name = "iris", data = iris[,1:4],
		shortnames = c('s.L', 's.W', 'p.L', 'p.W'),
		group = iris$Species,
		labels = substr(iris$Species,1,2))

## NG_graph
G <- completegraph(shortnames(ng.iris))
LG <- linegraph(G, sep = "++")
ng.lg <- ng_graph("3d transition", LG, "++", "fruchtermanReingold" )

## NG_image
## see the image demos: demo(package = "RnavGraph")

## Visualization instruction
viz1 <- ng_2d(ng.iris, ng.lg, glyphs = c("s.L","s.W","p.L","p.W"))
viz1

RnavGraph documentation built on May 29, 2017, 4:18 p.m.