% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/motifs.R
\name{plot.cograph_motifs}
\alias{plot.cograph_motifs}
\title{Plot Network Motifs}
\usage{
\method{plot}{cograph_motifs}(
  x,
  type = c("bar", "heatmap", "network"),
  show_nonsig = FALSE,
  top_n = NULL,
  colors = c("#2166AC", "#F7F7F7", "#B2182B"),
  combined = TRUE,
  ...
)
}
\arguments{
\item{x}{A \code{cograph_motifs} object from \code{\link[=motif_census]{motif_census()}}}

\item{type}{Plot type:
\describe{
\item{\code{"bar"}}{(default) Bar chart of motif frequencies, colored by
significance direction (over/under-represented).}
\item{\code{"heatmap"}}{Heatmap of z-scores across motif types.}
\item{\code{"network"}}{Network diagrams of the top motifs by |z-score|.}
}}

\item{show_nonsig}{Show non-significant motifs? Default FALSE.}

\item{top_n}{Show only top N motifs by |z-score|. Default NULL (all).}

\item{colors}{Three-element color vector for under-represented, neutral, and
over-represented motifs. Default \code{c("#2166AC", "#999999", "#B2182B")}
(blue/gray/red).}

\item{combined}{Logical: when TRUE (default) and \code{type = "network"},
arrange the per-motif panels in an internal grid via
\code{graphics::par(mfrow=...)}. Set to FALSE to draw into a layout the
caller has already configured (e.g. via \code{\link{panel_layout}()}).
Has no effect for \code{type = "bar"} or \code{type = "heatmap"}.}

\item{...}{Additional arguments passed to plotting functions}
}
\value{
A ggplot2 object (invisibly)
}
\description{
Visualize motif frequencies and their statistical significance.
}
\examples{
mat <- matrix(sample(0:1, 100, replace = TRUE, prob = c(0.7, 0.3)), 10, 10)
diag(mat) <- 0
m <- motif_census(mat, directed = TRUE, n_random = 50)
plot(m)
plot(m, type = "network")

}
\seealso{
\code{\link[=motif_census]{motif_census()}} for the analysis that produces this object

Other motifs: 
\code{\link{extract_motifs}()},
\code{\link{extract_triads}()},
\code{\link{get_edge_list}()},
\code{\link{motif_census}()},
\code{\link{motifs}()},
\code{\link{plot.cograph_motif_analysis}()},
\code{\link{subgraphs}()},
\code{\link{triad_census}()}
}
\concept{motifs}
