Skip to content

Commit

Permalink
Add example to 'plot' method
Browse files Browse the repository at this point in the history
  • Loading branch information
stewid committed Nov 29, 2015
1 parent 92fa1fe commit 93e3e3c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
10 changes: 10 additions & 0 deletions R/siminf_model.R
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,16 @@ siminf_model <- function(G,
##' @importFrom graphics plot
##' @importFrom graphics title
##' @export
##' @examples
##' ## Create a 'SISe' demo model with 1 node and initialize
##' ## it to run over 1000 days.
##' model <- demo_model(nodes = 1, days = 1000, model = "SISe")
##'
##' ## Run the model and save the result
##' result <- run(model)
##'
##' ## Plot the proportion susceptible and infected individuals
##' plot(result)
setMethod("plot",
signature(x = "siminf_model"),
function(x, legend, t0 = NULL, col = NULL, lty = NULL, ...)
Expand Down
11 changes: 11 additions & 0 deletions man/plot-methods.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 93e3e3c

Please sign in to comment.