grid.metapost: Draw a MetaPost curve.

Description Usage Arguments Value Author(s) See Also Examples

Description

Draw a MetaPost curve in grid graphics.

Usage

1
2
3
4
5
6
7
## S3 method for class 'mppath'
metapostGrob(x, gp = gpar(), name = NULL, digits=2, ...)
## S3 method for class 'mpcontrols'
metapostGrob(x, gp = gpar(), name = NULL, ...)
## S3 method for class 'mpcontrolList'
metapostGrob(x, gp = gpar(), name = NULL, ...)
grid.metapost(...)

Arguments

x

A MetaPost path, either unsolved (a description generated using knot etc), or solved (as produced by mptrace).

gp

Graphical parameters (from a call to gpar).

name

A name for the grob that is created.

digits

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

...

Arguments passed to metapostGrob.

Value

metapostGrob creates a "metapostgrob" object.

Author(s)

Paul Murrell

See Also

knot, mptrace.

Examples

1
2
3
4
oldunits <- options(metapost.units="in")
p <- knot(0, 0) + dir(0) + dir(0) + knot(1, 1) 
grid.metapost(p)
options(oldunits)

metapost documentation built on June 25, 2019, 1:02 a.m.