Description Usage Arguments Details Note Examples
A manifold map that fills the full extent of the plot.
1 | manifoldMapStretch(x, f, size_x = 500, size_y = 500, image_size = 50, ...)
|
x |
A [N,D] matrix of coordinates. |
f |
A function that, called with the index number of a row of |
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 |
Ported from http://cs.stanford.edu/people/karpathy/cnnembed/. Each position is filled with its nearest neighbor.
This function is experimental.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.