Skip to contents

2D grid data from "How to Use t-SNE Effectively".

Usage

grid_data(n = 10)

Arguments

n

Number of points per side.

Value

Data frame with coordinates in the x and y columns, and a per-point color in the color column.

Details

Creates a two-dimensional square grid with equal spacing between points. Point color goes from dark to light with increasing x coordinate and from green to blue with increasing y.

Examples

df <- grid_data(n = 10)