Skip to contents

Encodes the package's default panel-size heuristics for multi-panel figure planning. The recommendation starts from panel count, then upgrades compact presets when labels, legends, heatmaps, significance annotations, or dense point overlays make a panel harder to read.

Usage

recommend_panel_spec(
  n_panels,
  plot_type = "general",
  complexity = "auto",
  supplementary = FALSE,
  long_labels = FALSE,
  rotated_x_labels = FALSE,
  significance = FALSE,
  heatmap = FALSE,
  complex_legend = FALSE,
  dense_points = FALSE
)

Arguments

n_panels

Number of panels to place in the composed figure.

plot_type

Broad plot family such as "general", "heatmap", "stacked_bar", or "small_multiples".

complexity

One of "auto", "simple", "moderate", or "complex". "auto" scores common readability risks from the logical flags below.

supplementary

Whether the figure is primarily a supplementary or overview figure rather than a main-text figure.

long_labels

Whether panels contain long axis/category labels.

rotated_x_labels

Whether x-axis labels need rotation.

significance

Whether significance brackets or p-value annotations are present.

heatmap

Whether at least one panel is a heatmap.

complex_legend

Whether the figure uses a large or multi-category legend.

dense_points

Whether panels overlay many points on summaries.

Value

A named list with the recommended spec, ncol, nrow, figure_width_cm, figure_height_cm, inferred complexity, split_figure, and human-readable rationale.