% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/heatmap.R
\name{heatmap_fixsize}
\alias{heatmap_fixsize}
\title{Compute fixed heatmap device size}
\usage{
heatmap_fixsize(
  width,
  width_sum,
  height,
  height_sum,
  units,
  ht_list,
  legend_list
)
}
\arguments{
\item{width}{Optional user-provided target width. If \code{NULL}, width is
estimated from the drawn heatmap layout.}

\item{width_sum}{Numeric baseline width used when heatmap body size is in
\code{npc} units.}

\item{height}{Optional user-provided target height. If \code{NULL}, height is
estimated from the drawn heatmap layout.}

\item{height_sum}{Numeric baseline height used when heatmap body size is in
\code{npc} units.}

\item{units}{Output unit string passed to grid conversion helpers, such as
\code{"in"}, \code{"cm"}, or \code{"mm"}.}

\item{ht_list}{A \code{ComplexHeatmap::Heatmap} or
\code{ComplexHeatmap::HeatmapList} object.}

\item{legend_list}{A list of \code{ComplexHeatmap::Legend} objects.}
}
\value{
A list with two converted units: \code{ht_width} and \code{ht_height}.
}
\description{
Compute fixed heatmap device size
}
\examples{
mat <- matrix(rnorm(100), nrow = 10)
ht <- ComplexHeatmap::Heatmap(mat, name = "expr")
lgd <- list(ComplexHeatmap::Legend(title = "expr", at = c(-2, 0, 2)))
out <- heatmap_fixsize(
  width = NULL,
  width_sum = 6,
  height = NULL,
  height_sum = 4,
  units = "in",
  ht_list = ht,
  legend_list = lgd
)
out
}
