type_rect: Rectangle plot type

View source: R/type_rect.R

type_rectR Documentation

Rectangle plot type

Description

Type function for plotting rectangles.

Usage

type_rect()

Details

Contrary to base rect, rectangles in tinyplot must be specified using the xmin, ymin,xmax, and ymax arguments.

Examples

i = 4*(0:10)

# "rect" type convenience character string
tinyplot(
  xmin = 100+i, ymin = 300+i, xmax = 150+i, ymax = 380+i,
  by = i, fill = 0.2,
  type = "rect"
)

# Same result with type_rect()
tinyplot(
  xmin = 100+i, ymin = 300+i, xmax = 150+i, ymax = 380+i,
  by = i, fill = 0.2,
  type = type_rect()
)


tinyplot documentation built on April 12, 2025, 9:15 a.m.