metapost {metapost}R Documentation

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.

Author(s)

Paul Murrell

See Also

knot

Examples

p <- knot(0, 0) + dir(0) + dir(0) + knot(1, 1)
mpcode <- metapost(p, NULL)
mpcode

[Package metapost version 1.0-6 Index]