% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_reg.R
\name{plot_reg}
\alias{plot_reg}
\title{Plot regression estimates}
\usage{
plot_reg(
  tbl,
  title = NULL,
  caption = NULL,
  ref_line = NULL,
  order_y = NULL,
  log_x = FALSE,
  xlim = NULL,
  breaks = NULL,
  point_color = "#6B7280",
  errorbar_color = "#6B7280",
  point_size = 2.8,
  point_stroke = 0.55,
  ci_linewidth = 0.55,
  base_size = 12,
  show_ref = NULL,
  sig_color = "#0072B2",
  sig_errorbar_color = "#0072B2",
  alpha = 0.05,
  show_adjustment_note = TRUE
)
}
\arguments{
\item{tbl}{A fitted \code{gtregression} object.}

\item{title}{Optional plot title.}

\item{caption}{Optional plot caption. If \code{NULL}, notes are added
automatically for adjusted \code{multi_reg()} objects and displayed
reference categories.}

\item{ref_line}{Optional numeric value for the reference line.
Defaults to 0 for linear models and 1 otherwise.}

\item{order_y}{Optional character vector specifying exposure order.}

\item{log_x}{Logical. If \code{TRUE}, use a log-scaled x-axis for ratio
measures. The default \code{FALSE} uses a linear x-axis.}

\item{xlim}{Optional numeric vector of length 2 specifying x-axis limits.}

\item{breaks}{Optional numeric vector of x-axis tick breaks.}

\item{point_color}{Fill color for non-significant estimate points.}

\item{errorbar_color}{Color for non-significant confidence intervals.}

\item{point_size}{Diameter of estimate points in millimetres.}

\item{point_stroke}{Outline width of estimate points.}

\item{ci_linewidth}{Line width of confidence intervals.}

\item{base_size}{Base font size. The default is designed for a clear report
or slide figure; increase it for a single large plot.}

\item{show_ref}{Logical or \code{NULL}. The default \code{NULL} inherits the
reference-row choice used to create \code{tbl}. If \code{TRUE}, reference
rows are shown. If \code{FALSE}, binary exposures are shown as compact rows
for the estimated non-reference category; affirmative levels such as
\code{Yes} or \code{1} are displayed using the variable name.}

\item{sig_color}{Optional fill color for significant points.}

\item{sig_errorbar_color}{Optional color for significant error bars.}

\item{alpha}{Significance level for linear models when \code{p.value} is available.}

\item{show_adjustment_note}{Logical; if \code{TRUE}, add a default caption
describing \code{adjust_for} variables when available.}
}
\value{
A \code{ggplot2} object.
}
\description{
Draw a forest-style plot from a fitted \code{gtregression} object produced by
functions such as \code{uni_reg()}, \code{multi_reg()}, \code{cox_reg()}, or
\code{surv_reg()}. Stratified regression outputs are displayed as one
faceted quick-view plot; use \code{forest_df()} and \code{forest_reg()} for
publication-style stratified forest tables.
}
