Generates the package logo as an SVG: a hexagon containing a small scatter with a fitted trend, drawn with the same coordinate and color machinery the package uses for real plots.

ggnext_logo(
  file = NULL,
  width = 520,
  dark = FALSE,
  style = c("wordmark", "monogram"),
  tagline = c("NEXT-GENERATION", "GRAMMAR OF GRAPHICS")
)

Arguments

file

Output path; NULL returns the SVG as a string.

width

Sticker width in pixels (height follows the hex ratio).

dark

Use the dark palette variant.

style

"wordmark" or "monogram".

tagline

Text under the wordmark, as one string or a character vector of lines (two read better than one long line). "" omits it. Ignored by the monogram style, which shows ggnext there instead.

Value

The SVG document as a length-1 character vector, invisibly when file is supplied.

Details

Two styles are available. "wordmark" (the default) spells out ggnext under the artwork with a tagline; "monogram" sets a large GG in the middle, which stays legible at favicon and app-icon sizes where a seven-character wordmark turns to mush.

Examples

svg <- ggnext_logo()
substr(svg, 1, 30)
#> [1] "<svg xmlns=\"http://www.w3.org/"

# App-icon variant.
icon <- ggnext_logo(style = "monogram", width = 256)