xyListPath: Generate Grobs from Coordinates

Description Usage Arguments Value Author(s) See Also Examples

View source: R/grob.R

Description

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

Usage

1
2
3
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.

Value

The result is a grob.

Author(s)

Paul Murrell

See Also

polyclip

Examples

1
2
3
4
5
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)

gridGeometry documentation built on May 6, 2019, 1:04 a.m.