This function is designed to update the size of the figure canvas.

fd_canvas(
  id,
  fdObj = fd_get_db(),
  width = fdObj$env[[id]]$canvas_options$width,
  height = fdObj$env[[id]]$canvas_options$height,
  units = fdObj$env[[id]]$canvas_options$units,
  dpi = fdObj$env[[id]]$canvas_options$dpi
)

Arguments

id

A character string representing the figure ID.

fdObj

An object of class fdObj.

width

A numeric value specifying the width of the canvas.

height

A numeric value specifying the height of the canvas.

units

A character string indicating the units of measurement for the canvas, such as "cm", "in", "mm", or "px".

dpi

A numeric value denoting the dots per inch (DPI) of the canvas.