% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gg_jpoint.R
\name{gg_jpoint}
\alias{gg_jpoint}
\title{Plot Joinpoint Regression Models}
\usage{
gg_jpoint(mods, obs = TRUE, jp = TRUE, facets = FALSE)
}
\arguments{
\item{mods}{List of joinpoint regression models (output of model_jp()).}

\item{obs}{Logical. If TRUE, displays observed data points.}

\item{jp}{Logical. If TRUE, displays joinpoints as vertical dashed lines.}

\item{facets}{Logical. If TRUE, displays one panel per group using facets.}
}
\value{
A ggplot object.
}
\description{
Creates a ggplot showing observed values, fitted joinpoint regression lines,
and optional joinpoints.
}
\examples{
library(dplyr)
# Load example data
data("plant", package = "segmented")

names(plant)

# Fit the joinpoint models
mods <- model_jp(data = plant, value = "y", time = "time", group = "group", k = 2, test = TRUE)

# Plot results
gg_jpoint(mods, obs = TRUE, jp = TRUE, facets = FALSE)

# Facets by group
gg_jpoint(mods, obs = TRUE, jp = TRUE, facets = TRUE)
}
