Skip to contents

ob_rectangle class

Usage

ob_rectangle(
  center = S7::class_missing,
  width = numeric(0),
  height = numeric(0),
  east = S7::class_missing,
  north = S7::class_missing,
  west = S7::class_missing,
  south = S7::class_missing,
  northeast = S7::class_missing,
  northwest = S7::class_missing,
  southwest = S7::class_missing,
  southeast = S7::class_missing,
  angle = numeric(0),
  vertex_radius = numeric(0),
  label = character(0),
  alpha = numeric(0),
  color = character(0),
  fill = character(0),
  linewidth = numeric(0),
  linetype = numeric(0),
  style = S7::class_missing,
  x = numeric(0),
  y = numeric(0),
  id = character(0),
  ...
)

Arguments

center

ob_point at center of the rectangle

width

width

height

height

east

right middle point (ob_point)

north

top middle point (ob_point)

west

left middle point (ob_point)

south

top middle point (ob_point)

northeast

upper right point (ob_point)

northwest

upper left point (ob_point)

southwest

lower left point (ob_point)

southeast

lower right point (ob_point)

angle

angle of text

vertex_radius

A numeric or unit vector of length one, specifying the corner radius for rounded corners

label

A character, angle, or ob_label object

alpha

numeric value for alpha transparency

color

character string for color

fill

character string for fill color

linewidth

Width of lines

linetype

type of lines

style

a style object

x

overrides x-coordinate in center@x

y

overrides y-coordinate in center@x

id

character string to identify object

...

<dynamic-dots> properties passed to style

Value

ob_rectangle object

Examples

ggdiagram() +
  ob_rectangle(center = ob_point(0,0), width = 3, height = 2)