% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/create_citation_network.R
\name{plot_citation_clusters}
\alias{plot_citation_clusters}
\title{Plot Citation Cluster Descriptions}
\usage{
plot_citation_clusters(cluster_description, section_colors = NULL, top_n = 10)
}
\arguments{
\item{cluster_description}{An object of class \code{"citation_cluster_description"}
returned by \code{describe_citation_clusters()}.}

\item{section_colors}{Optional named vector of hex colors for sections
(e.g., from \code{citation_analysis_results$section_colors}). If NULL,
colors are auto-generated via an internal palette.}

\item{top_n}{Integer. Maximum number of terms per section to display.
Re-slices if the input has more. Default is 10.}
}
\value{
A list of class \code{"citation_cluster_plots"} with three plotly objects:
\itemize{
\item \code{tfidf_bars}: Horizontal bar chart of top TF-IDF terms per section,
with one subplot row per section sharing the x-axis
\item \code{tfidf_heatmap}: Heatmap of terms vs sections showing TF-IDF intensity
\item \code{references_per_section}: Bar chart of reference counts per section
}
Returns NULL with a warning if \code{cluster_description} is NULL.
}
\description{
Creates interactive plotly visualizations that describe citation clusters
thematically, complementing the interactive network from
\code{create_citation_network()}.
}
\details{
The three plots provide complementary views of the citation clusters:
\itemize{
\item \strong{TF-IDF bars} show which terms are most distinctive for each section
\item \strong{Heatmap} reveals which terms are unique to a section versus shared
\item \strong{References per section} provides an overview of bibliographic density
}
}
\examples{
\dontrun{
results <- analyze_scientific_content(pdf_path)
cluster_desc <- describe_citation_clusters(results)
plots <- plot_citation_clusters(cluster_desc,
  section_colors = results$section_colors
)

# Display individual plots
plots$tfidf_bars
plots$tfidf_heatmap
plots$references_per_section
}

}
