make_offsets: Calculate Dice Dot Offsets

View source: R/utils.R

make_offsetsR Documentation

Calculate Dice Dot Offsets

Description

Computes the (x, y) offset positions for drawing dots on dice faces.

Usage

make_offsets(n, width = 0.5, height = 0.5, pad = 0.1)

Arguments

n

Integer from 1 to 6, indicating the number of dots on the die face.

width

Total width of the die face (default: 0.5).

height

Total height of the die face (default: 0.5).

pad

Padding to apply around the dot grid (default: 0.1).

Value

A data.frame with key, x, and y columns indicating dot positions.


ggdiceplot documentation built on Aug. 22, 2025, 1:08 a.m.