% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ggnetview_perturbation_curve.R
\name{ggnetview_perturbation_curve}
\alias{ggnetview_perturbation_curve}
\title{Plot a network perturbation (attack) curve}
\usage{
ggnetview_perturbation_curve(curve, metric = "LCC_fraction")
}
\arguments{
\item{curve}{A data frame as returned in the `curve` element of
[get_network_perturbation()], or that element bound from several runs
(e.g. `rbind(random$curve, targeted$curve)`) to overlay strategies.}

\item{metric}{Character (default `"LCC_fraction"`). Which metric to
plot; must be present in `curve$metric`.}
}
\value{
A ggplot object.
}
\description{
Renders the perturbation curve produced by
[get_network_perturbation()] -- a chosen topology metric against the
fraction of nodes removed, coloured by strategy. For the random
strategy a mean +/- standard-error ribbon is drawn. The styling matches
the other `ggnetview_*` plots (`theme_classic`, square aspect, black
axes).
}
\examples{
\donttest{
data(ppi_example)
obj <- build_graph_from_df(
  df              = ppi_example$ppi,
  node_annotation = ppi_example$annotation
)
rnd <- get_network_perturbation(obj, strategy = "random", bootstrap = 20)
tgt <- get_network_perturbation(obj, strategy = "targeted",
                                centrality = "degree")
ggnetview_perturbation_curve(rbind(rnd$curve, tgt$curve))
}
}
\seealso{
[get_network_perturbation()].
}
