Skip to contents

Random points on a 2D circle from "How to Use t-SNE Effectively".

Usage

random_circle_data(n)

Arguments

n

Number of points.

Value

Data frame with x and y coordinates in the columns x and y respectively, and color in the color column.

Details

Creates a dataset where the points are located on the circumference of a circle of unit radius, where the angle subtended by the point at the center of the circle has been randomly sampled. Each point has a color linearly mapped from the angle to a rainbow color scheme.

Examples

df <- random_circle_data(n = 50)