manifoldMapStretch: manifoldMapStretch

Description Usage Arguments Details Note Examples

View source: R/visualize.R

Description

A manifold map that fills the full extent of the plot.

Usage

1
manifoldMapStretch(x, f, size_x = 500, size_y = 500, image_size = 50, ...)

Arguments

x

A [N,D] matrix of coordinates.

f

A function that, called with the index number of a row of x, returns an R object representing an image. See the example.

size_x

The width of the requested plot, in pixels.

size_y

The height of the requested plot, in pixels.

image_size

The size to plot each image; each is plotted as a square.

...

Additional parameters passed to plot.

Details

Ported from http://cs.stanford.edu/people/karpathy/cnnembed/. Each position is filled with its nearest neighbor.

Note

This function is experimental.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
# Demonstration of f
load(system.file("extdata", "faces.Rda", package="largeVis"))

imagepaths <- paste("pathtoimages",
   faceLabels[,1], sub("png", "jpg", faceLabels[,2]), sep = "/")

manifoldMapStretch(as.matrix(faceCoords[,1:2]),
   f = function(x) jpeg::readJPEG(imagePaths[x]),
   size_x = 5000, size_y = 5000, image_size = 100)

## End(Not run)

largeVis documentation built on Feb. 17, 2018, 1:01 a.m.