Description Usage Arguments Details Examples
Create a ggplot2
-style plot with the fitted models curves and the epidemic data.
1 2 3 4 |
object |
A |
point_size |
Point size |
line_size |
Line size |
models |
Select the models to be displayed in the panel |
It is possible to add more ggplot
components by using the +
syntax. See examples below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | epi1 <- sim_logistic(N = 30,
y0 = 0.01,
dt = 5,
r = 0.3,
alpha = 0.5,
n = 4)
data = data.frame(time = epi1[,2], y = epi1[,4])
fitted = fit_lin( time = data$time, y = data$y)
plot_fit(fitted)
# adding ggplot components
library(ggplot2)
plot_fit(fitted)+
theme_minimal()+
ylim(0,1)+
labs(y = "Disease internsity", x = "Time")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.