metapost (version 1.0-6)

metapost: Generate a MetaPost File

Description

Generate a MetaPost file from a MetaPost path.

Usage

metapost(x, file = "fig.mp", digits=2)

Arguments

x

A MetaPost path, as produced from knot etc.

file

The name of the file to produce. If NULL, no file is created.

digits

The number of decimal places to use when writing floating point values in MetaPost code.

Value

The MetaPost code is returned invisibly.

See Also

knot

Examples

Run this code
# NOT RUN {
p <- knot(0, 0) + dir(0) + dir(0) + knot(1, 1)
mpcode <- metapost(p, NULL)
mpcode
# }

Run the code above in your browser using DataCamp Workspace