Skip to contents

Renders and saves a hex sticker to SVG. Requires the svglite package.

Usage

save_hex_svg(sticker, filename, width = 2)

Arguments

sticker

A ggplot object returned by hex_sticker().

filename

Character. Output file path. Must end in .svg.

width

Numeric. Width in inches. Default 2.

Value

The filename path, invisibly.

Details

Save a hex sticker to an SVG file

Examples

# \donttest{
if (requireNamespace("svglite", quietly = TRUE)) {
  s <- hex_sticker("mypackage")
  tmp <- tempfile(fileext = ".svg")
  save_hex_svg(s, tmp)
}
# }