Polygon plot type

Description

Type function for plotting polygons. Arguments are passed to polygon.

Usage

type_polygon(density = NULL, angle = 45)

Arguments

density the density of shading lines, in lines per inch. The default value of NULL means that no shading lines are drawn. A zero value of density means no shading nor filling whereas negative values and NA suppress shading (and so allow color filling).
angle the slope of shading lines, given as an angle in degrees (counter-clockwise).

Examples

library("tinyplot")

# "polygon" type convenience character string
tinyplot(1:9, c(2,1,2,1,NA,2,1,2,1), type = "polygon")

# Use `type_polygon()` to pass extra arguments for customization
tinyplot(1:9, c(2,1,2,1,NA,2,1,2,1), type = type_polygon(density = c(10, 20)))