glyph: Create a Glyph Visualization

View source: R/glyph.R

glyphR Documentation

Create a Glyph Visualization

Description

Entry point for the glyph grammar. Creates a specification that describes a visualization declaratively. The spec is a plain nested list: it can be inspected, serialized to JSON, and compiled into an interactive HTML widget.

Usage

glyph(data = NULL, ...)

Arguments

data

A data frame or tibble, or NULL if each mark will supply its own data.

...

Global aesthetic mappings, written as bare column names or expressions, e.g. glyph(mtcars, x = wt, y = mpg). Every mark uses these unless it sets its own.

Value

A glyph_spec object

Examples

spec <- glyph(mtcars, x = wt, y = mpg) |>
  mark_point()
summary(spec)

glyph documentation built on Oct. 21, 2026, 5:12 p.m.