xyListPath: Generate Grobs from Coordinates

View source: R/grob.R

xyListPathR 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=, name=NULL, gp=gpar())
xyListToPolygon(x, name=NULL, gp=gpar())
xyListToLine(x, name=NULL, gp=gpar()) 

xyListPath(x, rule, 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)

gridGeometry documentation built on Sept. 11, 2024, 8:41 p.m.