print.glyph_spec: Draw a glyph spec when it is printed

View source: R/render.R

print.glyph_specR Documentation

Draw a glyph spec when it is printed

Description

A printed spec draws itself. At the console it opens in the viewer, and in R Markdown, Quarto and vignettes it is embedded in the document. Call render() only to set the width and height, and use summary() for a text description.

In a non-interactive session that isn't knitting a document, such as Rscript, there is nowhere to draw, so printing gives a one-line description instead.

Usage

## S3 method for class 'glyph_spec'
print(x, ...)

## S3 method for class 'glyph_spec'
knit_print(x, ..., options = NULL)

Arguments

x

A glyph_spec object

...

Passed on to knitr when knitting; otherwise ignored.

options

knitr chunk options, supplied by knitr.

Value

print() invisibly returns x. knit_print() returns the rendered widget's HTML for knitr to include in the document.


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