% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot-centrality.R
\name{plot_centrality_heatmap}
\alias{plot_centrality_heatmap}
\title{Plot Centrality Heatmap}
\usage{
plot_centrality_heatmap(
  x,
  measures = NULL,
  cluster_rows = TRUE,
  order_by = NULL,
  show_values = FALSE,
  value_digits = 1L,
  low = "#2171B5",
  mid = "white",
  high = "#CB181D",
  limits = c(-2.5, 2.5),
  title = NULL,
  subtitle = "z-scored within measure",
  ...
)
}
\arguments{
\item{x}{Centrality data frame (from \code{\link{centrality}}) or a
network input.}

\item{measures}{Character vector of measure names.}

\item{cluster_rows}{Logical. Hierarchically cluster rows so nodes with
similar profiles are adjacent. Default TRUE.}

\item{order_by}{If \code{cluster_rows = FALSE}, optionally the name of
a measure to sort rows by (descending). Default: first measure.}

\item{show_values}{Logical. Print z-scores in cells. Default FALSE.}

\item{value_digits}{Decimal places for cell values. Default 1.}

\item{low, mid, high}{Color stops for the diverging scale. Defaults to
blue -> white -> red.}

\item{limits}{Numeric c(min, max) z-score range. Values outside are
squished to the endpoints. Default c(-2.5, 2.5).}

\item{title, subtitle}{Plot title and subtitle.}

\item{...}{Passed to \code{\link{centrality}} when \code{x} is a
network.}
}
\value{
A ggplot object.
}
\description{
Heatmap of nodes (rows) by centrality measures (columns), z-standardized
within measure so the diverging palette is meaningful. Optional row
clustering groups nodes with similar centrality profiles.
}
\examples{
adj <- matrix(c(0,1,1,0,0, 1,0,1,1,0, 1,1,0,1,1, 0,1,1,0,1, 0,0,1,1,0),
              5, 5)
rownames(adj) <- colnames(adj) <- LETTERS[1:5]
plot_centrality_heatmap(adj)
}
