Skip to contents

ob_rectangle class

Usage

ob_rectangle(
  center = class_missing,
  width = class_missing,
  height = class_missing,
  east = class_missing,
  north = class_missing,
  west = class_missing,
  south = class_missing,
  northeast = class_missing,
  northwest = class_missing,
  southwest = class_missing,
  southeast = class_missing,
  angle = 0,
  radius = class_missing,
  label = class_missing,
  alpha = class_missing,
  color = "black",
  fill = NA_character_,
  linewidth = class_missing,
  linetype = class_missing,
  style = class_missing,
  x = class_missing,
  y = class_missing,
  ...
)

Arguments

center

point at center of the circle

width

width

height

height

east

right middle point

north

top middle point

west

left middle point

south

top middle point

northeast

upper right point

northwest

upper left point

southwest

lower left point

southeast

lower right point

angle

angle of text

radius

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

label

A character, angle, or 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

...

<dynamic-dots> arguments passed to style object

Examples

# specify center point and radius
p <- ob_point(0,0)
ob_rectangle(p, width = 2, height = 2)
#> <ob_rectangle>
#> @ center: <ob_point>
#>  @ x: num 0
#>  @ y: num 0
#> @ width : num 2
#> @ height: num 2
#> Other props: label, radius, alpha, color, fill, linewidth,
#>              linetype, angle, area, bounding_box, perimeter,
#>              northeast, northwest, southwest, southeast, east,
#>              north, west, south, side, length, style, tibble, geom,
#>              normal_at, point_at, aesthetics