Skip to contents

Provides helper functions to construct the SVG path 'd' https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Attribute/d attribute string. Supports all standard SVG path commands including 'moveto', 'lineto', 'closepath', quadratic and cubic Bézier curves, and elliptical arc curves. Also provides convenience wrappers for common shapes such as arcs, circles, ellipses, polygons, slashes, and stars. Coordinates may be supplied as numeric vectors or as 'affiner' coordinate objects and an option is available to automatically round them to a target number of decimal places for more compact svg strings. An option is also available to use a bottom-left origin (as is conventional in R graphics) rather than the top-left origin used by SVG.

Package options

The following dee option may be set globally via base::options():

dee.attrs

plot.dee() passes this to omsvg::svg_path()'s attrs argument.

dee.background_color

Passed to plot.dee()'s background_color argument.

dee.digits

Passed to digits argument of svg d path command functions.

dee.fill

plot.dee() passes this to omsvg::svg_path()'s fill argument.

dee.height

Passed to height arguments; the height of svg image (in pixels).

dee.origin_at_bottom

Passed to origin_at_bottom argument of svg d path command functions.

dee.sep

Passed to sep argument of svg d path command functions.

dee.stroke

plot.dee() passes this to omsvg::svg_path()'s stroke argument.

dee.stroke_width

plot.dee() passes this to omsvg::svg_path()'s stroke_width argument.

dee.width

Passed to width arguments; the width of svg image (in pixels).

Author

Maintainer: Trevor L. Davis trevor.l.davis@gmail.com (ORCID)

Authors: