EVOLUTION-MANAGER
Edit File: plot.sir.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Plotting the results on multiple SIR model runs</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for plot.sir {igraph}"><tr><td>plot.sir {igraph}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Plotting the results on multiple SIR model runs</h2> <h3>Description</h3> <p>This function can conveniently plot the results of multiple SIR model simulations. </p> <h3>Usage</h3> <pre> ## S3 method for class 'sir' plot( x, comp = c("NI", "NS", "NR"), median = TRUE, quantiles = c(0.1, 0.9), color = NULL, median_color = NULL, quantile_color = NULL, lwd.median = 2, lwd.quantile = 2, lty.quantile = 3, xlim = NULL, ylim = NULL, xlab = "Time", ylab = NULL, ... ) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>The output of the SIR simulation, coming from the <code><a href="sir.html">sir</a></code> function.</p> </td></tr> <tr valign="top"><td><code>comp</code></td> <td> <p>Character scalar, which component to plot. Either ‘NI’ (infected, default), ‘NS’ (susceptible) or ‘NR’ (recovered).</p> </td></tr> <tr valign="top"><td><code>median</code></td> <td> <p>Logical scalar, whether to plot the (binned) median.</p> </td></tr> <tr valign="top"><td><code>quantiles</code></td> <td> <p>A vector of (binned) quantiles to plot.</p> </td></tr> <tr valign="top"><td><code>color</code></td> <td> <p>Color of the individual simulation curves.</p> </td></tr> <tr valign="top"><td><code>median_color</code></td> <td> <p>Color of the median curve.</p> </td></tr> <tr valign="top"><td><code>quantile_color</code></td> <td> <p>Color(s) of the quantile curves. (It is recycled if needed and non-needed entries are ignored if too long.)</p> </td></tr> <tr valign="top"><td><code>lwd.median</code></td> <td> <p>Line width of the median.</p> </td></tr> <tr valign="top"><td><code>lwd.quantile</code></td> <td> <p>Line width of the quantile curves.</p> </td></tr> <tr valign="top"><td><code>lty.quantile</code></td> <td> <p>Line type of the quantile curves.</p> </td></tr> <tr valign="top"><td><code>xlim</code></td> <td> <p>The x limits, a two-element numeric vector. If <code>NULL</code>, then it is calculated from the data.</p> </td></tr> <tr valign="top"><td><code>ylim</code></td> <td> <p>The y limits, a two-element numeric vector. If <code>NULL</code>, then it is calculated from the data.</p> </td></tr> <tr valign="top"><td><code>xlab</code></td> <td> <p>The x label.</p> </td></tr> <tr valign="top"><td><code>ylab</code></td> <td> <p>The y label. If <code>NULL</code> then it is automatically added based on the <code>comp</code> argument.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Additional arguments are passed to <code>plot</code>, that is run before any of the curves are added, to create the figure.</p> </td></tr> </table> <h3>Details</h3> <p>The number of susceptible/infected/recovered individuals is plotted over time, for multiple simulations. </p> <h3>Value</h3> <p>Nothing. </p> <h3>Author(s)</h3> <p>Eric Kolaczyk (<a href="http://math.bu.edu/people/kolaczyk/">http://math.bu.edu/people/kolaczyk/</a>) and Gabor Csardi <a href="mailto:csardi.gabor@gmail.com">csardi.gabor@gmail.com</a>. </p> <h3>References</h3> <p>Bailey, Norman T. J. (1975). The mathematical theory of infectious diseases and its applications (2nd ed.). London: Griffin. </p> <h3>See Also</h3> <p><code><a href="sir.html">sir</a></code> for running the actual simulation. </p> <h3>Examples</h3> <pre> g <- sample_gnm(100, 100) sm <- sir(g, beta=5, gamma=1) plot(sm) </pre> <hr /><div style="text-align: center;">[Package <em>igraph</em> version 1.3.5 <a href="00Index.html">Index</a>]</div> </body></html>