metapost (version 1.0-6)

grid.metapost: Draw a MetaPost curve.

Description

Draw a MetaPost curve in grid graphics.

Usage

# S3 method for mppath
metapostGrob(x, gp = gpar(), name = NULL, digits=2, ...)
# S3 method for mpcontrols
metapostGrob(x, gp = gpar(), name = NULL, ...)
# S3 method for 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.

See Also

knot, mptrace.

Examples

Run this code
# NOT RUN {
oldunits <- options(metapost.units="in")
p <- knot(0, 0) + dir(0) + dir(0) + knot(1, 1) 
grid.metapost(p)
options(oldunits)
# }

Run the code above in your browser using DataCamp Workspace