% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/S4_methods.R
\name{plot_motifs,motifSimulation-method}
\alias{plot_motifs,motifSimulation-method}
\title{Plot Embedded Motifs in Functional Curves}
\usage{
\S4method{plot_motifs}{motifSimulation}(object, curves, name, path)
}
\arguments{
\item{object}{An S4 object of class `motifSimulation` that has been previously constructed using the `motifSimulationBuilder` function. This object contains all necessary parameters and configurations used during curve and motif generation (mandatory).}

\item{curves}{The output list from the `generateCurves` function, containing the generated functional curves with embedded motifs. This parameter provides the data to be visualized (mandatory).}

\item{name}{Name of the output file.}

\item{path}{A character string specifying the directory path where the generated plots will be saved. The function will save the plots in this directory, allowing for organized storage and easy access to visual results (mandatory).}
}
\value{
The function does not return any value but generates and saves plots of the functional curves with embedded motifs in the specified directory. Each plot visually represents the motifs within the curves, aiding in the qualitative assessment of motif embedding.
}
\description{
The `plot_motifs` function visualizes the results generated by the `generateCurves` function. It provides comprehensive plots of functional curves with embedded motifs, allowing users to inspect the placement and characteristics of each motif within the curves. This visualization is crucial for validating the correctness of motif embedding and for gaining insights into the distribution and variability of motifs across different curves.

The function supports saving the generated plots to a specified directory, facilitating the creation of reports or the sharing of visual results. By plotting motifs in distinct colors or styles, `plot_motifs` ensures that overlapping motifs and their respective curves remain distinguishable, enhancing the clarity and interpretability of the visualizations.

This plotting utility is an essential tool within the `funMoDisco` package, aiding users in the exploratory analysis of simulated functional data and the assessment of motif detection algorithms.
}
\examples{
\donttest{
# Example: Plotting motifs in generated curves
# Assume 'builder' has been created and 'curves' have been generated using generateCurves
mot_details <- NULL
builder <- funMoDisco::motifSimulationBuilder(N = 20, len = 300, mot_details)
curves <- funMoDisco::generateCurves(builder)

# Specify the directory to save plots
plots_name <- "plots_1"  

# Generate and save the plots
funMoDisco::plot_motifs(builder, curves, plots_name, path = tempdir())
}
}
