geometry(type = "circle", width = 1, height = width, width_unit = "cm", height_unit = width_unit)
circle(radius = 1, unit = "cm")
square(length = 1, unit = "cm")
ellipsis(a = 1, b = 1, a_unit = "cm", b_unit = a_unit)
rectangle(width = 1, height = 1, width_unit = "cm", height_unit = width_unit)
label_rect(label, padding = margin(1, 1, 1.5, 1, "mm"), ...)
is.geometry(x)
'circle'
and
'rect'
is supported.margin
functiongpar
geometry
is the base constructor, while the rest are helpers to save
typing. circle
creates circles width a given radius, square
creates squares at a given side length, ellipsis
creates ellipses with
given a and b values (width and height radii), and rectangle
makes
rectangles of a given width and height. label_rect is a helper that, given
a list of strings and potentially formatting options creates a rectangle that
encloses the string.
geometry(c('circle', 'rect', 'rect'), 1:3, 3:1)
circle(1:4, 'mm')
label_rect(c('some', 'different', 'words'), fontsize = 18)
Run the code above in your browser using DataLab