% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/PM_model.R
\name{plot.PM_model}
\alias{plot.PM_model}
\title{Plot PM_model objects}
\usage{
\method{plot}{PM_model}(x, marker = TRUE, line = TRUE, explicit, implicit, print = TRUE, ...)
}
\arguments{
\item{x}{The name of an \link{PM_model} object.}

\item{marker}{Controls the characteristics of the compartments (nodes).
It can be boolean or a list.
\code{TRUE} will plot the compartments with default characteristics.
\code{FALSE} will suppress compartment plotting.
If a list, can control some marker characteristics, including overriding defaults.
These include:
\itemize{
\item{\code{color}} Marker color (default: dodgerblue).
\item{\code{opacity}} Ranging between 0 (fully transparent) to 1 (fully opaque). Default is 0.5.
\item{\code{size}} Relative size of boxes, ranging from 0 to 1.  Default is 0.25.
\item{\code{line}} A list of  additional attributes governing the outline for filled shapes, most commonly
color (default: black) and width (default: 0.5).
}
\if{html}{\out{<br>}}
\if{html}{\out{<br>}}
Example: \code{marker = list(color = "red", opacity = 0.8, line = list(color = "black", width = 1))}}

\item{line}{Controls characteristics of arrows (edges).
\code{TRUE} will plot default lines. \code{FALSE} will suppress lines.
If a list, can control some line characteristics, including overriding defaults.
These include:
\itemize{
\item{\code{color}} Line color (default: black)
\item{\code{width}} Thickness in points (default: 1).
}
\if{html}{\out{<br>}}
\if{html}{\out{<br>}}
Example: \code{line = list(color = "red", width = 2)}}

\item{explicit}{A data frame or tibble containing two columns named \code{from} and \code{to}
to add additional connecting arrows to the plot indicating transfer between
compartments. For each row, the \code{from} column contains the compartment number of the arrow origin, and the
\code{to} column contains the compartment number of the arrow destination. Use 0 to indicate
a destination to the external sink. e.g., \code{explicit = data.frame(from = 3, to = 0)}}

\item{implicit}{Similar to \code{explicit}, used to add dashed connecting arrows
to the plot indicating implicit transfer between
compartments. For each row, the \code{from} column contains the compartment number of the arrow origin, and the
\code{to} column contains the compartment number of the arrow destination. Use 0 to indicate
a destination to the external sink. e.g., \code{implicit = data.frame(from = 2, to = 4)}}

\item{print}{If \code{TRUE}, will print the object and return it. If \code{FALSE}, will only return the object.}

\item{...}{Not used.}
}
\value{
A plot object of the model.
}
\description{
\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}}

Plots a \link{PM_model} based on differential equations using ggplot.
}
\details{
This accepts a \link{PM_model} object and creates a network plot where nodes are compartments
and edges are arrows connecting compartments.
}
\examples{
\dontrun{
NPex$model$plot()
}
}
\seealso{
\link{PM_model}, \code{\link[ggplot2:ggplot]{ggplot2::ggplot()}}

Other PMplots:
\code{\link[=plot.PM_cov]{plot.PM_cov()}},
\code{\link[=plot.PM_cycle]{plot.PM_cycle()}},
\code{\link[=plot.PM_data]{plot.PM_data()}},
\code{\link[=plot.PM_final]{plot.PM_final()}},
\code{\link[=plot.PM_op]{plot.PM_op()}},
\code{\link[=plot.PM_opt]{plot.PM_opt()}},
\code{\link[=plot.PM_pop]{plot.PM_pop()}},
\code{\link[=plot.PM_post]{plot.PM_post()}},
\code{\link[=plot.PM_pta]{plot.PM_pta()}},
\code{\link[=plot.PM_sim]{plot.PM_sim()}},
\code{\link[=plot.PM_valid]{plot.PM_valid()}}
}
\author{
Markus Hovd, Julian Otalvaro, Michael Neely
}
\concept{PMplots}
