Description Usage Arguments Details Author(s) See Also Examples

plots outer and inner shape and colors inbetween; color can be a palette

1 2 3 |

`xyouter ` |
2-column matrix with x,y values of outer shape. |

`xyinner ` |
2-column matrix of 2-valued vector with x,y values of
inner shape; default is centroid of |

`col ` |
color palette to be used; also allowed are two extremes. |

`values ` |
if not |

`zlim ` |
Only if |

`lcol ` |
line color. |

`lwd ` |
width of external line, only if |

`... ` |
arguments passed to R-function polygon |

draws and outer and inner shape, as specified in `xyouter`

, and
`xyinner`

and fills with a palette of colors inbetween;

`values`

: if not null, a matrix providing (radius,z-values) couples,
used for coloring.
Here radius are positive values denoting the relative distance between
the shapes centre and edge.
The radiusses are rescaled to be in [0,1] if needed.
z-values (2nd column of `values`

) together with `zlim`

and
`col`

denote the coloration level.

Colors in `col`

will be interpolated to the z-values and used to
color an interval as given by the input radiusses.

If `xyinner`

is a point, the shape is full.

Karline Soetaert <[email protected]>

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | ```
#an egg
color <-greycol(100)
emptyplot(c(-3.2, 3.2), col = color[length(color)], main = "filledshape")
b <- 4
a <- 9
x <- seq(-sqrt(a), sqrt(a), by = 0.01)
g <- b-b/a*x^2 - 0.2*b*x + 0.2*b/a*x^3
g[g<0] <- 0
x1 <- c(x, rev(x))
g1 <- c(sqrt(g), rev(-sqrt(g)))
xouter <- cbind(x1, g1)
xouter <- rbind(xouter, xouter[1,])
filledshape(xouter, xyinner = c(-1, 0), col = color)
# a mill
color <- shadepalette(grey(0.3), "yellow", n = 50)
emptyplot(c(-3.3, 3.3), col = color[length(color)], main = "filledshape")
x <- seq(0, 0.8*pi, pi/100)
y <- sin(x)
xouter <- cbind(x, y)
for (i in seq(0, 360, 60))
xouter <- rbind(xouter, rotatexy(cbind(x, y), mid = c(0, 0), angle = i))
filledshape(xouter, c(0, 0), col = color)
# abstract art
emptyplot(col = "darkgrey", main = "filledshape")
filledshape(matrix(ncol = 2, runif(100)), col = "darkblue")
``` |

```
```

shape documentation built on Feb. 9, 2018, 6:08 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.