% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lexical_analysis.R
\name{plot_lexical_dispersion}
\alias{plot_lexical_dispersion}
\title{Plot Lexical Dispersion}
\usage{
plot_lexical_dispersion(
  dispersion_data,
  scale = "relative",
  title = "Lexical Dispersion",
  colors = NULL,
  height = 400,
  width = NULL,
  marker_size = 8
)
}
\arguments{
\item{dispersion_data}{Data frame from calculate_lexical_dispersion()}

\item{scale}{Character, "relative" or "absolute" (must match calculation)}

\item{title}{Plot title (default: "Lexical Dispersion")}

\item{colors}{Named vector of colors for each term, or NULL for auto}

\item{height}{Plot height in pixels (default: 400)}

\item{width}{Plot width in pixels (default: NULL for auto)}

\item{marker_size}{Size of position markers (default: 8)}
}
\value{
A plotly object
}
\description{
Creates an X-ray plot showing where terms appear across documents.
Each row represents a term, and marks indicate occurrences.
}
\examples{
\donttest{
tokens <- quanteda::tokens(TextAnalysisR::SpecialEduTech$abstract[1:5])
dispersion <- calculate_lexical_dispersion(tokens, c("learning", "instruction"))
plot_lexical_dispersion(dispersion)
}
}
\concept{visualization}
