polyclip | R Documentation |
This function combines two sets of coordinates using one of the following operations: intersection, union, minus, and xor.
polyclip(A, B, ...) ## S3 method for class 'grob' polyclip(A, B, op="intersection", closed=TRUE, reduceA = if (closed) "union" else "flatten", reduceB = "union", fillA = NULL, fillB = NULL, ...) ## S3 method for class 'gList' polyclip(A, B, op="intersection", closed=TRUE, reduceA = if (closed) "union" else "flatten", reduceB = "union", fillA = NULL, fillB = NULL, ...) ## S3 method for class 'gPath' polyclip(A, B, op="intersection", closed=TRUE, strict=FALSE, grep=FALSE, global=FALSE, reduceA = if (closed) "union" else "flatten", reduceB = "union", fillA = NULL, fillB = NULL, ...) ## S3 method for class 'character' polyclip(A, B, op="intersection", closed=TRUE, strict=FALSE, grep=FALSE, global=FALSE, reduceA = if (closed) "union" else "flatten", reduceB = "union", fillA = NULL, fillB = NULL, ...)
A |
A set of coordinates describing the subject shape. Or a grob, gList, or a gPath (or a character value) identifying a grob that has already been drawn from which coordinates are generated. |
B |
A set of coordinates describing the clip shape. Or a grob, gList, or a gPath (or a character value) identifying a grob that has already been drawn from which coordinates are generated. |
op |
A character value describing the operation. One of
|
closed |
A logical value indicating whether the |
reduceA, reduceB |
A character value describing the operation to be used if either
|
fillA, fillB |
A character value describing the fill rule. Possible values are
|
strict, grep, global |
Arguments controlling the interpretation of the gPath
(passed to |
... |
Arguments used by methods. |
The subject coordinates are combined with the clip coordinates
using the op
operation.
The result is a new set of coordinates.
Paul Murrell
polyclip
r <- rectGrob(x=1/3, y=1/3, width=.4, height=.4) c <- circleGrob(x=2/3, y=2/3, r=.2) polyclip(r, c)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.