xyListPath {gridGeometry}R Documentation

Generate Grobs from Coordinates

Description

This function generates a grob from a set of coordinates (a list of (x,y) lists).

Usage

xyListToPath(x, rule="winding", name=NULL, gp=gpar())
xyListToPolygon(x, name=NULL, gp=gpar())
xyListToLine(x, name=NULL, gp=gpar()) 

xyListPath(x, rule="winding", name=NULL, gp=gpar())
xyListPolygon(x, name=NULL, gp=gpar())
xyListLine(x, name=NULL, gp=gpar()) 

Arguments

x

A set of coordinates (e.g., from polyclip or trim).

rule

A fill rule: "winding" or "evenodd".

name

A name for the resulting grob.

gp

Graphical parameter settings for the resulting grob.

Details

Following the addition of the xyListFromGrob function, the *To*() forms are preferred.

Value

The result is a grob.

Author(s)

Paul Murrell

See Also

polyclip

Examples

r <- rectGrob(x=1/3, y=1/3, width=.4, height=.4)
c <- circleGrob(x=2/3, y=2/3, r=.2)
coords <- polyclip(r, c)
xyListPath(coords)
xyListLine(coords)

[Package gridGeometry version 0.3-0 Index]