Learn R Programming

tidygate (version 1.0.19)

gate_interactive: Interactively gate data with a simple scatter plot

Description

Create an interactive scatter plot based on user-defined X and Y coordinates. Colour, shape, size and alpha can be defined as constant values, or can be controlled by values in a specified column.

Usage

gate_interactive(x, y, colour, shape, alpha, size, rasterise_points)

Value

A vector of strings, of the gates each X and Y coordinate pair is within. If gates are drawn interactively, they are temporarily saved to `tidygate_env$gates`

Arguments

x

A vector representing the X dimension.

y

A vector representing the Y dimension.

colour

A single colour code string compatible with ggplot2. Or, a vector representing the point colour.

shape

A single ggplot2 shape numeric ranging from 0 to 127. Or, a vector representing the point shape, coercible to a factor of 6 or less levels.

alpha

A single ggplot2 alpha numeric ranging from 0 to 1. Or, a vector representing the point alpha, either a numeric or factor of 6 or less levels.

size

A single ggplot2 size numeric ranging from 0 to 20. Or, a vector representing the point size, either a numeric or factor of 6 or less levels.

rasterise_points

A logical. If TRUE, points are rasterised to an image before interactive gating is launched, improving performance for large datasets. Some interactive features are unavailable with rasterisation enabled.