% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/visualization.R
\name{plot_network}
\alias{plot_network}
\title{Plot a network graph}
\usage{
plot_network(
  graph,
  layout = "fr",
  color_by = "type",
  node_size = 3,
  edge_alpha = 0.3,
  show_labels = NULL
)
}
\arguments{
\item{graph}{An \code{igraph} or \code{tidygraph::tbl_graph} object.}

\item{layout}{Layout algorithm (default \code{"fr"} for Fruchterman-Reingold).
See \code{\link[ggraph:create_layout]{ggraph::create_layout()}} for options.}

\item{color_by}{Vertex attribute name to map to node color (default
\code{"type"}).}

\item{node_size}{Base node size (default 3).}

\item{edge_alpha}{Edge transparency (default 0.3).}

\item{show_labels}{Whether to label nodes (default \code{TRUE} for nodes
with degree >= 3, or all if graph has <= 50 nodes).}
}
\value{
A \code{ggplot} object.
}
\description{
Visualize an \code{igraph} or \code{tbl_graph} object using \code{ggraph}.
}
\examples{
\dontrun{
g <- build_hct_network("UNITCM_H001")
plot_network(g)
}
}
