% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot-distributions.R
\name{plot_centrality_distribution}
\alias{plot_centrality_distribution}
\title{Plot Centrality Distribution}
\usage{
plot_centrality_distribution(
  x,
  measure = "degree_all",
  type = c("histogram", "density"),
  normalize = FALSE,
  bins = NULL,
  log = "",
  col = "steelblue",
  border = "white",
  main = NULL,
  xlab = NULL,
  ...
)
}
\arguments{
\item{x}{A data frame from \code{\link{centrality}}, or a network input
(matrix, igraph, cograph_network, tna).}

\item{measure}{Character. Which centrality measure to plot. Default
\code{"degree_all"}. Must match a column name in the centrality output.}

\item{type}{Character. \code{"histogram"} (default) or \code{"density"}.}

\item{normalize}{Logical. Show proportions instead of counts. Default FALSE.}

\item{bins}{Integer or NULL. Number of bins. Default NULL (auto).}

\item{log}{Character. Log scaling: \code{""}, \code{"y"}, or \code{"xy"}.
Values containing \code{"x"} are accepted for compatibility but only the
y-axis is log-scaled by this plotting implementation. Default \code{""}.}

\item{col}{Fill color. Default \code{"steelblue"}.}

\item{border}{Border color. Default \code{"white"}.}

\item{main}{Plot title. Default auto-generated from measure name.}

\item{xlab}{X-axis label. Default auto-generated.}

\item{...}{Additional arguments passed to \code{\link[graphics]{barplot}}
or \code{\link[graphics]{plot}}.}
}
\value{
Invisibly returns the centrality values plotted.
}
\description{
Histogram or density plot of any centrality measure. Accepts the output
of \code{\link{centrality}} directly.
}
\examples{
adj <- matrix(c(0,1,1,0, 1,0,1,1, 1,1,0,1, 0,1,1,0), 4, 4)
rownames(adj) <- colnames(adj) <- LETTERS[1:4]
cograph::plot_centrality_distribution(adj, measure = "degree_all")
}
