Learn R Programming

dtGAP (version 0.0.2)

compute_layout: Compute Layout Dimensions for Tree + Heatmap Plot

Description

Determines panel widths and heights based on page dimensions, margin, and proportions.

Usage

compute_layout(
  sorted_dat,
  margin = 20,
  total_w = 297,
  total_h = 210,
  tree_p = 0.3
)

Value

A list with:

tree_w

Width for tree panel.

heatmap_w

Width for heatmap panel.

total_draw_h

Total drawable height after margin.

row_h

Height allocated to rows.

col_h

Height allocated to columns.

tree_h

Height for tree panel (same as row_h).

offset_h

Adjustment applied to ensure minimum column height.

margin

Margin passed through.

Arguments

sorted_dat

List returned by sorted_mat(). Must contain sorted_test_matrix.

margin

Numeric. Margin around the drawing area (mm).

total_w

Numeric. Total width of page (mm).

total_h

Numeric. Total height of page (mm).

tree_p

Numeric. Proportion of total width allocated to the tree panel.