Learn R Programming

ggdiceplot (version 1.0.1)

make_offsets: 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)

Value

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

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).