geom_args: Show Arguments for a Geometry

View source: R/registry.R

geom_argsR Documentation

Show Arguments for a Geometry

Description

Prints the required and optional ... arguments accepted by a geometry when used with hd_make(). This is the primary discoverability tool for geometry-specific arguments that do not appear in hd_make()'s signature.

Usage

geom_args(type = NULL)

Arguments

type

Character. Geometry name, e.g. "line", "ranked_bar". If NULL (default), prints a summary for every registered geometry.

Value

A data frame of argument metadata, invisibly. The primary purpose is the side-effect of printing.

Why this exists

hd_make() uses ... for all geometry-specific arguments so its own signature stays clean regardless of how many geometries are registered. The trade-off is that users cannot see available args from hd_make() alone. geom_args() solves that: it reads the required_args and optional_args fields registered for each geometry and presents them in a readable table.

Examples

geom_args("line")
geom_args("ranked_bar")
geom_args("arearange")
geom_args()           # all registered geometries


highdir documentation built on July 31, 2026, 5:06 p.m.