Last data update: 2014.03.03

R: Plot 'siminf_model'
plot,scheduled_events-methodR Documentation

Plot siminf_model

Description

Plot siminf_model

Usage

## S4 method for signature 'scheduled_events'
plot(x, frame.plot = FALSE, ...)

## S4 method for signature 'siminf_model'
plot(x, legend, t0 = NULL, col = NULL,
  lty = NULL, ...)

## S4 method for signature 'SISe'
plot(x, t0 = NULL, ...)

## S4 method for signature 'SISe3'
plot(x, t0 = NULL, ...)

## S4 method for signature 'SISe3_sp'
plot(x, t0 = NULL, ...)

## S4 method for signature 'SISe_sp'
plot(x, t0 = NULL, ...)

Arguments

x

The model to plot

frame.plot

Draw a frame around each plot. Default is FALSE.

...

Additional arguments affecting the plot produced.

legend

The character vector to appear in the legend.

t0

The first date of x@tspan as a character string in format 'yyyy-mm-dd'. Default is NULL which prints the x-axis labels as the sequence 1:length(x@tspan). If non-null, the labels are converted to dates.

col

The plotting color for each compartment. Default is black.

lty

The line type for each compartment. Default is the sequence: 1=solid, 2=dashed, 3=dotted, 4=dotdash, 5=longdash, 6=twodash.

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)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(SimInf)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/SimInf/plot-methods.Rd_%03d_medium.png", width=480, height=480)
> ### Name: plot,scheduled_events-method
> ### Title: Plot 'siminf_model'
> ### Aliases: plot plot,SISe-method plot,SISe3-method plot,SISe3_sp-method
> ###   plot,SISe_sp-method plot,scheduled_events-method
> ###   plot,siminf_model-method plot-methods
> 
> ### ** 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)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>