% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/15_code_generator.R
\name{generate_dotplot_code}
\alias{generate_dotplot_code}
\title{Generate Publication DotPlot Code}
\usage{
generate_dotplot_code(
  gsea_res_var = "gsea_res",
  contrast_id,
  pathways,
  color_mode = "padj",
  size_mode = "core_size",
  left_group = "Left",
  right_group = "Right",
  palette = "D",
  point_range = c(3, 8),
  target_collection = "ALL",
  base_size = 12,
  margin_top = 18,
  margin_bottom = 18,
  margin_left = 18,
  margin_right = 18,
  fig_width = 9,
  fig_height = 7,
  fig_dpi = 300
)
}
\arguments{
\item{gsea_res_var}{Character. Name of the GseaRes variable in the user's
environment (default \code{"gsea_res"}).}

\item{contrast_id}{Character. Contrast ID to extract.}

\item{pathways}{Character vector. Pathway IDs to display.}

\item{color_mode}{Character. One of "padj", "pval", "nes".}

\item{size_mode}{Character. One of "core_size", "setsize".}

\item{left_group}{Character. Left contrast label.}

\item{right_group}{Character. Right contrast label.}

\item{palette}{Character. Viridis option letter ("A"-"H").}

\item{point_range}{Numeric length 2. Min/max point size in mm.}

\item{target_collection}{Character. Gene set collection(s) to extract
(e.g. \code{"H"}, \code{c("C2", "C2:CP")}). Default \code{"ALL"}.}

\item{base_size}{Numeric. theme_bw base font size.}

\item{margin_top}{Numeric. Top plot margin (mm).}

\item{margin_bottom}{Numeric. Bottom plot margin (mm).}

\item{margin_left}{Numeric. Left plot margin (mm).}

\item{margin_right}{Numeric. Right plot margin (mm).}

\item{fig_width}{Numeric. Figure width in inches for ggsave.}

\item{fig_height}{Numeric. Figure height in inches for ggsave.}

\item{fig_dpi}{Numeric. DPI for PNG raster output (default 300).}
}
\value{
Character scalar of executable R code.
}
\description{
Return an executable ggplot2 script reproducing the Pathway
  Relationship module's dotplot as a static, publication-ready figure.
  The generated script assumes a \code{GseaRes} object is already loaded
  in the R environment and derives plot data via \code{extract_gsea_task()}
  + \code{get_core_genes_list()}, producing concise reproducible code
  without embedding raw data.
}
\examples{
code <- generate_dotplot_code(
  gsea_res_var = "gsea_res", contrast_id = "untrt_vs_trt",
  pathways = c("HALLMARK_TNFA_SIGNALING_VIA_NFKB"))
cat(code)
}
